From c9be530c56406f9e80c91d97b412ccc949a329e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 27 Dec 2022 08:46:03 +0100 Subject: [PATCH] tests: Remove redundant info in names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- src/occupant.rs | 2 +- src/room.rs | 8 ++++---- src/tests/iq.rs | 8 ++++---- src/tests/presence.rs | 18 +++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/occupant.rs b/src/occupant.rs index 9501980..08ad8f8 100644 --- a/src/occupant.rs +++ b/src/occupant.rs @@ -136,7 +136,7 @@ mod tests { }; #[tokio::test] - async fn test_occupant_update_presence() { + async fn occupant_update_presence() { let presence_louise1 = PresenceFull::try_from( Presence::new(PresenceType::None) .with_from(LOUISE_FULL1.clone()) diff --git a/src/room.rs b/src/room.rs index f537bc0..3a0a03c 100644 --- a/src/room.rs +++ b/src/room.rs @@ -420,7 +420,7 @@ mod tests { }; #[tokio::test] - async fn test_broadcast_presence_resync() { + async fn broadcast_presence_resync() { let roomjid = BareJid::from_str("room@muc").unwrap(); let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap(); let participant1 = roomjid.clone().with_resource(String::from("nick1")); @@ -518,7 +518,7 @@ mod tests { } #[tokio::test] - async fn test_broadcast_presence_update() { + async fn broadcast_presence_update() { let roomjid = BareJid::from_str("room@muc").unwrap(); let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap(); let participant1 = roomjid.clone().with_resource(String::from("nick1")); @@ -599,7 +599,7 @@ mod tests { } #[tokio::test] - async fn test_broadcast_presence_join() { + async fn broadcast_presence_join() { let roomjid = BareJid::from_str("room@muc").unwrap(); let realjid1 = FullJid::from_str("foo@bar/qxx").unwrap(); let participant1 = roomjid.clone().with_resource(String::from("nick1")); @@ -719,7 +719,7 @@ mod tests { } #[tokio::test] - async fn test_broadcast_presence_leave() { + async fn broadcast_presence_leave() { let presence_louise = PresenceFull::try_from( Presence::new(PresenceType::None) .with_from(LOUISE_FULL1.clone()) diff --git a/src/tests/iq.rs b/src/tests/iq.rs index f979c9e..7eae660 100644 --- a/src/tests/iq.rs +++ b/src/tests/iq.rs @@ -31,7 +31,7 @@ use xmpp_parsers::{ }; #[tokio::test] -async fn test_iq_unimplemented() { +async fn unimplemented() { let disco: Element = Iq { from: Some(Jid::Full(LOUISE_FULL1.clone())), to: Some(Jid::Bare(COMPONENT_JID.clone())), @@ -61,7 +61,7 @@ async fn test_iq_unimplemented() { } #[tokio::test] -async fn test_self_ping_answer() { +async fn self_ping_answer() { let join: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) .with_to(Jid::Full(LOUISE_ROOM1_PART.clone())) @@ -117,7 +117,7 @@ async fn test_self_ping_answer() { } #[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 roomjid = COMPONENT_JID.clone().with_node("room"); let participant1 = roomjid.clone().with_resource("nick1"); @@ -152,7 +152,7 @@ async fn test_self_ping_participant_non_existing() { } #[tokio::test] -async fn test_ping_room() { +async fn ping_room() { let realjid1 = Jid::Full(FullJid::from_str("foo@bar/qxx").unwrap()); let roomjid = COMPONENT_JID.clone().with_node("room"); diff --git a/src/tests/presence.rs b/src/tests/presence.rs index 57f0155..427ecd0 100644 --- a/src/tests/presence.rs +++ b/src/tests/presence.rs @@ -38,7 +38,7 @@ use xmpp_parsers::{ }; #[tokio::test] -async fn test_join_presence_empty_room() { +async fn join_empty_room() { // let join: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) @@ -112,7 +112,7 @@ async fn test_join_presence_empty_room() { } #[tokio::test] -async fn test_join_presence_nick_already_assigned() { +async fn join_nick_already_assigned() { // let join1: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) @@ -162,7 +162,7 @@ async fn test_join_presence_nick_already_assigned() { } #[tokio::test] -async fn test_join_presence_existing_room() { +async fn join_existing_room() { let join1: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) .with_to(Jid::Full(LOUISE_ROOM1_PART.clone())) @@ -270,7 +270,7 @@ async fn test_join_presence_existing_room() { } #[tokio::test] -async fn test_presence_resync() { +async fn resync() { let join1: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) .with_to(Jid::Full(LOUISE_ROOM1_PART.clone())) @@ -354,7 +354,7 @@ async fn test_presence_resync() { } #[tokio::test] -async fn test_leave_non_existing_room() { +async fn leave_non_existing_room() { let leave1: Element = Presence::new(PresenceType::Unavailable) .with_from(Jid::Full(LOUISE_FULL1.clone())) .with_to(Jid::Full(LOUISE_ROOM1_PART.clone())) @@ -368,7 +368,7 @@ async fn test_leave_non_existing_room() { } #[tokio::test] -async fn test_leave_last_participant() { +async fn leave_last_participant() { let join1: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) .with_to(Jid::Full(LOUISE_ROOM1_PART.clone())) @@ -416,7 +416,7 @@ async fn test_leave_last_participant() { } #[tokio::test] -async fn test_leave_room_not_last() { +async fn leave_room_not_last() { let join1: Element = Presence::new(PresenceType::None) .with_from(Jid::Full(LOUISE_FULL1.clone())) .with_to(Jid::Full(LOUISE_ROOM1_PART.clone())) @@ -504,7 +504,7 @@ async fn test_leave_room_not_last() { } #[tokio::test] -async fn test_presence_update_joined() { +async fn update_joined() { let mut rooms: HashMap = HashMap::new(); rooms.insert( ROOM1_BARE.clone(), @@ -542,7 +542,7 @@ async fn test_presence_update_joined() { } #[tokio::test] -async fn test_presence_update_not_joined() { +async fn update_not_joined() { // https://xmpp.org/extensions/xep-0045.html#example-43 // GC1 join presence