diff --git a/app/views/epp/domains/info.xml.builder b/app/views/epp/domains/info.xml.builder index 492248958..d1695f20c 100644 --- a/app/views/epp/domains/info.xml.builder +++ b/app/views/epp/domains/info.xml.builder @@ -41,7 +41,7 @@ xml.epp_head do xml.tag!('domain:clID', @domain.registrar.code) - xml.tag!('domain:crID', @domain.cr_id) + xml.tag!('domain:crID', @domain.cr_id) if @domain.cr_id.present? xml.tag!('domain:crDate', @domain.created_at.try(:iso8601)) if @domain.updated_at > @domain.created_at diff --git a/test/integration/epp/domain/info/base_test.rb b/test/integration/epp/domain/info/base_test.rb index 4aaa6c8ba..dd54e651e 100644 --- a/test/integration/epp/domain/info/base_test.rb +++ b/test/integration/epp/domain/info/base_test.rb @@ -144,10 +144,7 @@ class EppDomainInfoBaseTest < EppTestCase response_xml = Nokogiri::XML(response.body) assert_epp_response :completed_successfully - schema = EPP_ALL_SCHEMA - - schema_validation_errors = schema.validate(response_xml) - assert_equal 0, schema_validation_errors.size + assert_correct_against_schema response_xml end def test_reveals_transfer_code_when_domain_is_owned_by_current_user @@ -173,6 +170,7 @@ class EppDomainInfoBaseTest < EppTestCase assert_equal '65078d5', response_xml.at_xpath('//domain:authInfo/domain:pw', 'domain' => Xsd::Schema.filename(for_prefix: 'domain-ee').to_s).text + assert_correct_against_schema response_xml end # Transfer code is the only info we conceal from other registrars, hence a bit oddly-looking @@ -203,6 +201,7 @@ class EppDomainInfoBaseTest < EppTestCase assert_equal '65078d5', response_xml.at_xpath('//domain:authInfo/domain:pw', 'domain' => Xsd::Schema.filename(for_prefix: 'domain-ee').to_s).text + assert_correct_against_schema response_xml end def test_conceals_transfer_code_when_domain_is_not_owned_by_current_user @@ -226,6 +225,7 @@ class EppDomainInfoBaseTest < EppTestCase headers: { 'HTTP_COOKIE' => 'session=api_goodnames' } response_xml = Nokogiri::XML(response.body) + assert_correct_against_schema response_xml assert_nil response_xml.at_xpath('//domain:authInfo/domain:pw', 'domain' => Xsd::Schema.filename(for_prefix: 'domain-ee').to_s) end