jid: Add test for Jid::Full ser/de

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-08-14 21:59:27 +02:00
parent e9066c353d
commit 8de14336f5
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -917,6 +917,10 @@ mod tests {
fn jid_ser_de() {
let jid: Jid = Jid::new("node@domain").unwrap();
serde_test::assert_tokens(&jid, &[serde_test::Token::Str("node@domain")]);
let jid: Jid = Jid::new("node@domain/resource").unwrap();
serde_test::assert_tokens(&jid, &[serde_test::Token::Str("node@domain/resource")]);
let jid: BareJid = BareJid::new("node@domain").unwrap();
serde_test::assert_tokens(&jid, &[serde_test::Token::Str("node@domain")]);