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

@ -35,6 +35,20 @@
<stated/> <stated/>
</retention> </retention>
</statement> </statement>
<statement>
<purpose>
<other/>
</purpose>
<recipient>
<unrelated/>
</recipient>
<retention>
<none/>
</retention>
</statement>
<expiry>
<relative>P1M</relative>
</expiry>
</dcp> </dcp>
</greeting> </greeting>
</epp> </epp>