Test that the login command with no service extensions omits svcExtension [issue #94]

This commit is contained in:
Kim Minh Kaplan 2023-03-27 09:48:42 +00:00 committed by masalachai
parent 75f1dfe03e
commit 6b82772c1f
2 changed files with 26 additions and 0 deletions

View File

@ -86,6 +86,12 @@ mod tests {
assert_serialized("request/login.xml", &object); assert_serialized("request/login.xml", &object);
} }
#[test]
fn command_no_extension() {
let object = Login::new("username", "password", Some("new-password"), None);
assert_serialized("request/login_no_extension.xml", &object);
}
#[test] #[test]
fn response() { fn response() {
let object = response_from_file::<Login>("response/login.xml"); let object = response_from_file::<Login>("response/login.xml");

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<login>
<clID>username</clID>
<pw>password</pw>
<newPW>new-password</newPW>
<options>
<version>1.0</version>
<lang>en</lang>
</options>
<svcs>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
</svcs>
</login>
<clTRID>cltrid:1626454866</clTRID>
</command>
</epp>