Skip to content

Commit

Permalink
Test that the login command with no service extensions omits svcExten…
Browse files Browse the repository at this point in the history
…sion [issue masalachai#94]
  • Loading branch information
kmkaplan committed Mar 27, 2023
1 parent 75f1dfe commit 56dae20
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ mod tests {
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]
fn response() {
let object = response_from_file::<Login>("response/login.xml");
Expand Down
20 changes: 20 additions & 0 deletions tests/resources/request/login_no_extension.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 56dae20

Please sign in to comment.