From 2cb5dbd1836403c6e1a7866dc56e905aba29aee9 Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Tue, 3 Feb 2015 11:19:53 +0200 Subject: [PATCH] Remove legal doc from domain info --- app/controllers/epp/domains_controller.rb | 4 -- spec/epp/domain_spec.rb | 50 ----------------------- 2 files changed, 54 deletions(-) diff --git a/app/controllers/epp/domains_controller.rb b/app/controllers/epp/domains_controller.rb index cd6fc0d5e..ad06a1883 100644 --- a/app/controllers/epp/domains_controller.rb +++ b/app/controllers/epp/domains_controller.rb @@ -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 diff --git a/spec/epp/domain_spec.rb b/spec/epp/domain_spec.rb index 511257d7e..e080ee186 100644 --- a/spec/epp/domain_spec.rb +++ b/spec/epp/domain_spec.rb @@ -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({