tests: Remove redundant info in names
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
9bd4adc880
commit
c9be530c56
4 changed files with 18 additions and 18 deletions
|
@ -136,7 +136,7 @@ mod tests {
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_occupant_update_presence() {
|
async fn occupant_update_presence() {
|
||||||
let presence_louise1 = PresenceFull::try_from(
|
let presence_louise1 = PresenceFull::try_from(
|
||||||
Presence::new(PresenceType::None)
|
Presence::new(PresenceType::None)
|
||||||
.with_from(LOUISE_FULL1.clone())
|
.with_from(LOUISE_FULL1.clone())
|
||||||
|
|
|
@ -420,7 +420,7 @@ mod tests {
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_broadcast_presence_resync() {
|
async fn broadcast_presence_resync() {
|
||||||
let roomjid = BareJid::from_str("room@muc").unwrap();
|
let roomjid = BareJid::from_str("room@muc").unwrap();
|
||||||
let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap();
|
let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap();
|
||||||
let participant1 = roomjid.clone().with_resource(String::from("nick1"));
|
let participant1 = roomjid.clone().with_resource(String::from("nick1"));
|
||||||
|
@ -518,7 +518,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_broadcast_presence_update() {
|
async fn broadcast_presence_update() {
|
||||||
let roomjid = BareJid::from_str("room@muc").unwrap();
|
let roomjid = BareJid::from_str("room@muc").unwrap();
|
||||||
let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap();
|
let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap();
|
||||||
let participant1 = roomjid.clone().with_resource(String::from("nick1"));
|
let participant1 = roomjid.clone().with_resource(String::from("nick1"));
|
||||||
|
@ -599,7 +599,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_broadcast_presence_join() {
|
async fn broadcast_presence_join() {
|
||||||
let roomjid = BareJid::from_str("room@muc").unwrap();
|
let roomjid = BareJid::from_str("room@muc").unwrap();
|
||||||
let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap();
|
let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap();
|
||||||
let participant1 = roomjid.clone().with_resource(String::from("nick1"));
|
let participant1 = roomjid.clone().with_resource(String::from("nick1"));
|
||||||
|
@ -719,7 +719,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_broadcast_presence_leave() {
|
async fn broadcast_presence_leave() {
|
||||||
let presence_louise = PresenceFull::try_from(
|
let presence_louise = PresenceFull::try_from(
|
||||||
Presence::new(PresenceType::None)
|
Presence::new(PresenceType::None)
|
||||||
.with_from(LOUISE_FULL1.clone())
|
.with_from(LOUISE_FULL1.clone())
|
||||||
|
|
|
@ -31,7 +31,7 @@ use xmpp_parsers::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_iq_unimplemented() {
|
async fn unimplemented() {
|
||||||
let disco: Element = Iq {
|
let disco: Element = Iq {
|
||||||
from: Some(Jid::Full(LOUISE_FULL1.clone())),
|
from: Some(Jid::Full(LOUISE_FULL1.clone())),
|
||||||
to: Some(Jid::Bare(COMPONENT_JID.clone())),
|
to: Some(Jid::Bare(COMPONENT_JID.clone())),
|
||||||
|
@ -61,7 +61,7 @@ async fn test_iq_unimplemented() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_self_ping_answer() {
|
async fn self_ping_answer() {
|
||||||
let join: Element = Presence::new(PresenceType::None)
|
let join: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
||||||
|
@ -117,7 +117,7 @@ async fn test_self_ping_answer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_self_ping_participant_non_existing() {
|
async fn self_ping_participant_non_existing() {
|
||||||
let realjid1 = Jid::Full(FullJid::from_str("foo@bar/qxx").unwrap());
|
let realjid1 = Jid::Full(FullJid::from_str("foo@bar/qxx").unwrap());
|
||||||
let roomjid = COMPONENT_JID.clone().with_node("room");
|
let roomjid = COMPONENT_JID.clone().with_node("room");
|
||||||
let participant1 = roomjid.clone().with_resource("nick1");
|
let participant1 = roomjid.clone().with_resource("nick1");
|
||||||
|
@ -152,7 +152,7 @@ async fn test_self_ping_participant_non_existing() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_ping_room() {
|
async fn ping_room() {
|
||||||
let realjid1 = Jid::Full(FullJid::from_str("foo@bar/qxx").unwrap());
|
let realjid1 = Jid::Full(FullJid::from_str("foo@bar/qxx").unwrap());
|
||||||
let roomjid = COMPONENT_JID.clone().with_node("room");
|
let roomjid = COMPONENT_JID.clone().with_node("room");
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ use xmpp_parsers::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_join_presence_empty_room() {
|
async fn join_empty_room() {
|
||||||
// <x xmlns='http://jabber.org/protocol/muc'/>
|
// <x xmlns='http://jabber.org/protocol/muc'/>
|
||||||
let join: Element = Presence::new(PresenceType::None)
|
let join: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
|
@ -112,7 +112,7 @@ async fn test_join_presence_empty_room() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_join_presence_nick_already_assigned() {
|
async fn join_nick_already_assigned() {
|
||||||
// <x xmlns='http://jabber.org/protocol/muc'/>
|
// <x xmlns='http://jabber.org/protocol/muc'/>
|
||||||
let join1: Element = Presence::new(PresenceType::None)
|
let join1: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
|
@ -162,7 +162,7 @@ async fn test_join_presence_nick_already_assigned() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_join_presence_existing_room() {
|
async fn join_existing_room() {
|
||||||
let join1: Element = Presence::new(PresenceType::None)
|
let join1: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
||||||
|
@ -270,7 +270,7 @@ async fn test_join_presence_existing_room() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_presence_resync() {
|
async fn resync() {
|
||||||
let join1: Element = Presence::new(PresenceType::None)
|
let join1: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
||||||
|
@ -354,7 +354,7 @@ async fn test_presence_resync() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_leave_non_existing_room() {
|
async fn leave_non_existing_room() {
|
||||||
let leave1: Element = Presence::new(PresenceType::Unavailable)
|
let leave1: Element = Presence::new(PresenceType::Unavailable)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
||||||
|
@ -368,7 +368,7 @@ async fn test_leave_non_existing_room() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_leave_last_participant() {
|
async fn leave_last_participant() {
|
||||||
let join1: Element = Presence::new(PresenceType::None)
|
let join1: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
||||||
|
@ -416,7 +416,7 @@ async fn test_leave_last_participant() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_leave_room_not_last() {
|
async fn leave_room_not_last() {
|
||||||
let join1: Element = Presence::new(PresenceType::None)
|
let join1: Element = Presence::new(PresenceType::None)
|
||||||
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
.with_from(Jid::Full(LOUISE_FULL1.clone()))
|
||||||
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
.with_to(Jid::Full(LOUISE_ROOM1_PART.clone()))
|
||||||
|
@ -504,7 +504,7 @@ async fn test_leave_room_not_last() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_presence_update_joined() {
|
async fn update_joined() {
|
||||||
let mut rooms: HashMap<BareJid, Room> = HashMap::new();
|
let mut rooms: HashMap<BareJid, Room> = HashMap::new();
|
||||||
rooms.insert(
|
rooms.insert(
|
||||||
ROOM1_BARE.clone(),
|
ROOM1_BARE.clone(),
|
||||||
|
@ -542,7 +542,7 @@ async fn test_presence_update_joined() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_presence_update_not_joined() {
|
async fn update_not_joined() {
|
||||||
// https://xmpp.org/extensions/xep-0045.html#example-43
|
// https://xmpp.org/extensions/xep-0045.html#example-43
|
||||||
// GC1 join presence
|
// GC1 join presence
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue