From 356194af089981fb26e4919d58d44020b2773f44 Mon Sep 17 00:00:00 2001 From: Nicholas Rempel Date: Thu, 4 Nov 2021 14:37:39 -0700 Subject: [PATCH] Update greetings test --- epp-client/src/tests/de.rs | 9 ++ .../test/resources/response/greeting.xml | 88 +++++++++++-------- 2 files changed, 60 insertions(+), 37 deletions(-) diff --git a/epp-client/src/tests/de.rs b/epp-client/src/tests/de.rs index cea2aee..c55ae34 100644 --- a/epp-client/src/tests/de.rs +++ b/epp-client/src/tests/de.rs @@ -4,6 +4,8 @@ mod response { use super::super::get_xml; use super::super::CLTRID; use crate::epp::object::StringValueTrait; + use crate::epp::response::ExpiryType; + use crate::epp::response::Relative; use crate::epp::response::{ EppCommandResponseError, EppGreeting, EppLoginResponse, EppLogoutResponse, }; @@ -38,6 +40,13 @@ mod response { .len(), 5 ); + assert_eq!(object.data.dcp.statement.len(), 2); + assert_eq!( + object.data.dcp.expiry.unwrap().ty, + ExpiryType::Relative(Relative { + relative: "P1M".to_string_value() + }) + ); } #[test] diff --git a/epp-client/test/resources/response/greeting.xml b/epp-client/test/resources/response/greeting.xml index cd37cc8..9cae7bd 100644 --- a/epp-client/test/resources/response/greeting.xml +++ b/epp-client/test/resources/response/greeting.xml @@ -1,40 +1,54 @@ - - ISPAPI EPP Server - 2021-07-25T14:51:17.0Z - - 1.0 - en - urn:ietf:params:xml:ns:host-1.0 - urn:ietf:params:xml:ns:domain-1.0 - urn:ietf:params:xml:ns:contact-1.0 - http://schema.ispapi.net/epp/xml/keyvalue-1.0 - - urn:ietf:params:xml:ns:secDNS-1.1 - urn:ietf:params:xml:ns:secDNS-1.0 - urn:ietf:params:xml:ns:rgp-1.0 - urn:ietf:params:xml:ns:fee-0.7 - http://schema.ispapi.net/epp/xml/keyvalue-1.0 - - - - - - - - - - - - - - - - - - - - - + + ISPAPI EPP Server + 2021-07-25T14:51:17.0Z + + 1.0 + en + urn:ietf:params:xml:ns:host-1.0 + urn:ietf:params:xml:ns:domain-1.0 + urn:ietf:params:xml:ns:contact-1.0 + http://schema.ispapi.net/epp/xml/keyvalue-1.0 + + urn:ietf:params:xml:ns:secDNS-1.1 + urn:ietf:params:xml:ns:secDNS-1.0 + urn:ietf:params:xml:ns:rgp-1.0 + urn:ietf:params:xml:ns:fee-0.7 + http://schema.ispapi.net/epp/xml/keyvalue-1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + P1M + + + \ No newline at end of file