Remove legal doc from domain info

This commit is contained in:
Martin Lensment 2015-02-03 11:19:53 +02:00
parent eb2d7481c7
commit 2cb5dbd183
2 changed files with 0 additions and 54 deletions

View file

@ -1415,56 +1415,6 @@ describe 'EPP Domain', epp: true do
end
end
it 'validates legal document type in info request' do
xml = @epp_xml.domain.info({
name: { value: domain.name }
}, {
_anonymus: [
legalDocument: {
value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==',
attrs: { type: 'jpg' }
}
]
})
response = epp_plain_request(xml, :xml)
response[:msg].should == 'Attribute is invalid: type'
xml = @epp_xml.domain.info({
name: { value: domain.name }
}, {
_anonymus: [
legalDocument: {
value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp=='
}
]
})
response = epp_plain_request(xml, :xml)
response[:msg].should == 'Attribute is invalid: type'
end
it 'saves legal document on info request' do
xml = @epp_xml.domain.info({
name: { value: domain.name }
}, {
_anonymus: [
legalDocument: {
value: 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp==',
attrs: { type: 'pdf' }
}
]
})
response = epp_plain_request(xml, :xml)
response[:msg].should == 'Command completed successfully'
docs = domain.legal_documents
docs.count.should == 1
docs.first.body.should == 'JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0Zp=='
docs.first.document_type.should == 'pdf'
end
### DELETE ###
it 'deletes domain' do
response = epp_plain_request(@epp_xml.domain.delete({