Update greetings test

This commit is contained in:
Nicholas Rempel 2021-11-04 14:37:39 -07:00 committed by masalachai
parent 7edb2402a2
commit 356194af08
2 changed files with 60 additions and 37 deletions

View File

@ -4,6 +4,8 @@ mod response {
use super::super::get_xml; use super::super::get_xml;
use super::super::CLTRID; use super::super::CLTRID;
use crate::epp::object::StringValueTrait; use crate::epp::object::StringValueTrait;
use crate::epp::response::ExpiryType;
use crate::epp::response::Relative;
use crate::epp::response::{ use crate::epp::response::{
EppCommandResponseError, EppGreeting, EppLoginResponse, EppLogoutResponse, EppCommandResponseError, EppGreeting, EppLoginResponse, EppLogoutResponse,
}; };
@ -38,6 +40,13 @@ mod response {
.len(), .len(),
5 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] #[test]

View File

@ -1,40 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
<greeting> <greeting>
<svID>ISPAPI EPP Server</svID> <svID>ISPAPI EPP Server</svID>
<svDate>2021-07-25T14:51:17.0Z</svDate> <svDate>2021-07-25T14:51:17.0Z</svDate>
<svcMenu> <svcMenu>
<version>1.0</version> <version>1.0</version>
<lang>en</lang> <lang>en</lang>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI> <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI> <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI> <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<objURI>http://schema.ispapi.net/epp/xml/keyvalue-1.0</objURI> <objURI>http://schema.ispapi.net/epp/xml/keyvalue-1.0</objURI>
<svcExtension> <svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI> <extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>urn:ietf:params:xml:ns:secDNS-1.0</extURI> <extURI>urn:ietf:params:xml:ns:secDNS-1.0</extURI>
<extURI>urn:ietf:params:xml:ns:rgp-1.0</extURI> <extURI>urn:ietf:params:xml:ns:rgp-1.0</extURI>
<extURI>urn:ietf:params:xml:ns:fee-0.7</extURI> <extURI>urn:ietf:params:xml:ns:fee-0.7</extURI>
<extURI>http://schema.ispapi.net/epp/xml/keyvalue-1.0</extURI> <extURI>http://schema.ispapi.net/epp/xml/keyvalue-1.0</extURI>
</svcExtension> </svcExtension>
</svcMenu> </svcMenu>
<dcp> <dcp>
<access> <access>
<all/> <all/>
</access> </access>
<statement> <statement>
<purpose> <purpose>
<admin/> <admin/>
<prov/> <prov/>
</purpose> </purpose>
<recipient> <recipient>
<ours/> <ours/>
<public/> <public/>
</recipient> </recipient>
<retention> <retention>
<stated/> <stated/>
</retention> </retention>
</statement> </statement>
</dcp> <statement>
</greeting> <purpose>
<other/>
</purpose>
<recipient>
<unrelated/>
</recipient>
<retention>
<none/>
</retention>
</statement>
<expiry>
<relative>P1M</relative>
</expiry>
</dcp>
</greeting>
</epp> </epp>