Add test case for empty queue poll response

This commit is contained in:
Nicholas Rempel 2022-01-05 11:41:05 -08:00 committed by masalachai
parent 569bd86bae
commit 427db7a1eb
2 changed files with 27 additions and 0 deletions

View File

@ -148,4 +148,19 @@ mod tests {
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
assert_eq!(object.tr_ids.server_tr_id, SVTRID.into());
}
#[test]
fn empty_queue_response() {
let xml = get_xml("response/message/poll_empty_queue.xml").unwrap();
let object = MessagePoll::deserialize_response(xml.as_str()).unwrap();
assert_eq!(object.result.code, 1300);
assert_eq!(
object.result.message,
"Command completed successfully; no messages".into()
);
assert_eq!(object.tr_ids.client_tr_id.unwrap(), CLTRID.into());
assert_eq!(object.tr_ids.server_tr_id, SVTRID.into());
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1300">
<msg>Command completed successfully; no messages</msg>
</result>
<trID>
<clTRID>cltrid:1626454866</clTRID>
<svTRID>RO-6879-1627224678242975</svTRID>
</trID>
</response>
</epp>