xmpp-parsers: Update to the new jid crate
This commit is contained in:
parent
cdf4486e53
commit
022a920300
18 changed files with 61 additions and 50 deletions
|
|
@ -273,7 +273,7 @@ mod tests {
|
|||
assert_eq!(items[0].id, Some(ItemId(String::from("test"))));
|
||||
assert_eq!(
|
||||
items[0].publisher.clone().unwrap(),
|
||||
BareJid::new("test", "coucou")
|
||||
BareJid::new("test@coucou").unwrap()
|
||||
);
|
||||
assert_eq!(items[0].payload, None);
|
||||
}
|
||||
|
|
@ -404,7 +404,7 @@ mod tests {
|
|||
)))
|
||||
);
|
||||
assert_eq!(subscription, Some(Subscription::Subscribed));
|
||||
assert_eq!(jid.unwrap(), BareJid::new("francisco", "denmark.lit"));
|
||||
assert_eq!(jid.unwrap(), BareJid::new("francisco@denmark.lit").unwrap());
|
||||
assert_eq!(expiry, Some("2006-02-28T23:59:59Z".parse().unwrap()));
|
||||
}
|
||||
_ => panic!(),
|
||||
|
|
|
|||
|
|
@ -546,7 +546,6 @@ impl From<PubSub> for Element {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use crate::data_forms::{DataForm, DataFormType, Field, FieldType};
|
||||
use jid::FullJid;
|
||||
|
||||
#[test]
|
||||
fn create() {
|
||||
|
|
@ -746,7 +745,7 @@ mod tests {
|
|||
let form = DataForm::try_from(elem).unwrap();
|
||||
|
||||
let options = Options {
|
||||
jid: Jid::Full(FullJid::new("juliet", "capulet.lit", "balcony")),
|
||||
jid: Jid::new("juliet@capulet.lit/balcony").unwrap(),
|
||||
node: None,
|
||||
subid: None,
|
||||
form: Some(form),
|
||||
|
|
|
|||
Loading…
Reference in a new issue