forked from lavina/lavina
test
This commit is contained in:
parent
dd33b41beb
commit
6491c8819b
|
@ -125,7 +125,7 @@ mod tests {
|
|||
use lavina_core::player::PlayerId;
|
||||
use proto_xmpp::bind::{Jid, Name, Resource, Server};
|
||||
use proto_xmpp::client::Presence;
|
||||
use proto_xmpp::muc::XUser;
|
||||
use proto_xmpp::muc::{Affiliation, Role, XUser, XUserItem};
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_muc_joining() -> Result<()> {
|
||||
|
@ -156,7 +156,17 @@ mod tests {
|
|||
server: Server(conn.hostname_rooms.clone()),
|
||||
resource: Some(conn.user.xmpp_muc_name.clone()),
|
||||
}),
|
||||
custom: vec![XUser],
|
||||
custom: vec![XUser {
|
||||
item: XUserItem {
|
||||
affiliation: Affiliation::Member,
|
||||
role: Role::Participant,
|
||||
jid: Jid {
|
||||
name: Some(conn.user.xmpp_name.clone()),
|
||||
server: Server(conn.hostname.clone()),
|
||||
resource: Some(conn.user.xmpp_resource.clone()),
|
||||
},
|
||||
},
|
||||
}],
|
||||
..Default::default()
|
||||
};
|
||||
assert_eq!(expected, response);
|
||||
|
@ -196,7 +206,17 @@ mod tests {
|
|||
server: Server(conn.hostname_rooms.clone()),
|
||||
resource: Some(conn.user.xmpp_muc_name.clone()),
|
||||
}),
|
||||
custom: vec![XUser],
|
||||
custom: vec![XUser {
|
||||
item: XUserItem {
|
||||
affiliation: Affiliation::Member,
|
||||
role: Role::Participant,
|
||||
jid: Jid {
|
||||
name: Some(conn.user.xmpp_name.clone()),
|
||||
server: Server(conn.hostname.clone()),
|
||||
resource: Some(conn.user.xmpp_resource.clone()),
|
||||
},
|
||||
},
|
||||
}],
|
||||
..Default::default()
|
||||
};
|
||||
assert_eq!(expected, response);
|
||||
|
|
|
@ -729,8 +729,8 @@ mod tests {
|
|||
}),
|
||||
r#type: MessageType::Chat,
|
||||
lang: None,
|
||||
subject: Some("daa".into()),
|
||||
body: "bbb".into(),
|
||||
subject: Some(Subject(Some("daa".into()))),
|
||||
body: Some("bbb".into()),
|
||||
custom: vec![Ignore],
|
||||
}
|
||||
)
|
||||
|
@ -752,8 +752,8 @@ mod tests {
|
|||
}),
|
||||
r#type: MessageType::Chat,
|
||||
lang: None,
|
||||
subject: Some("daa".into()),
|
||||
body: "bbb".into(),
|
||||
subject: Some(Subject(Some("daa".into()))),
|
||||
body: Some("bbb".into()),
|
||||
custom: vec![Ignore],
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue