mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Remove legal doc from domain info
This commit is contained in:
parent
eb2d7481c7
commit
2cb5dbd183
2 changed files with 0 additions and 54 deletions
|
@ -15,10 +15,6 @@ class Epp::DomainsController < EppController
|
|||
def info
|
||||
@domain = find_domain
|
||||
handle_errors(@domain) and return unless @domain
|
||||
|
||||
@domain.attach_legal_document(Epp::EppDomain.parse_legal_document_from_frame(params[:parsed_frame]))
|
||||
@domain.save!(validate: false)
|
||||
|
||||
render_epp_response '/epp/domains/info'
|
||||
end
|
||||
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue