From 6b82772c1f27ce4a0eddaaec18aea08d3f5fa94f Mon Sep 17 00:00:00 2001 From: Kim Minh Kaplan Date: Mon, 27 Mar 2023 09:48:42 +0000 Subject: [PATCH] Test that the login command with no service extensions omits svcExtension [issue #94] --- src/login.rs | 6 ++++++ .../resources/request/login_no_extension.xml | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/resources/request/login_no_extension.xml diff --git a/src/login.rs b/src/login.rs index 80dfc1a..a1fda65 100644 --- a/src/login.rs +++ b/src/login.rs @@ -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::("response/login.xml"); diff --git a/tests/resources/request/login_no_extension.xml b/tests/resources/request/login_no_extension.xml new file mode 100644 index 0000000..26e1cbd --- /dev/null +++ b/tests/resources/request/login_no_extension.xml @@ -0,0 +1,20 @@ + + + + + username + password + new-password + + 1.0 + en + + + urn:ietf:params:xml:ns:host-1.0 + urn:ietf:params:xml:ns:contact-1.0 + urn:ietf:params:xml:ns:domain-1.0 + + + cltrid:1626454866 + +