Replace some hardcoded schema paths for method calls

This commit is contained in:
Alex Sherman 2021-05-21 15:14:31 +05:00
parent a0d0ce3e00
commit 00a0be2341
59 changed files with 481 additions and 480 deletions

View file

@ -5,10 +5,10 @@ class DeserializersXmlIdentTest < ActiveSupport::TestCase
def test_returns_empty_hash_when_not_present
xml_string = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<epp xmlns="#{Xsd::Schema.filename(for_prefix: 'epp-ee')}">
<command>
<update>
<contact:update xmlns:contact="https://epp.tld.ee/schema/contact-ee-1.1.xsd">
<contact:update xmlns:contact="#{Xsd::Schema.filename(for_prefix: 'contact-ee')}">
<contact:id>john-001</contact:id>
<contact:chg>
<contact:postalInfo>
@ -31,10 +31,10 @@ class DeserializersXmlIdentTest < ActiveSupport::TestCase
def test_returns_empty_hash_when_not_valid
xml_string = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<epp xmlns="#{Xsd::Schema.filename(for_prefix: 'epp-ee')}">
<command>
<delete>
<contact:delete xmlns:contact="https://epp.tld.ee/schema/contact-ee-1.1.xsd">
<contact:delete xmlns:contact="#{Xsd::Schema.filename(for_prefix: 'contact-ee')}">
<contact:id>FIRST0:SH2027223711</contact:id>
<contact:authInfo>
<contact:pw>wrong password</contact:pw>
@ -42,7 +42,7 @@ class DeserializersXmlIdentTest < ActiveSupport::TestCase
</contact:delete>
</delete>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="#{Xsd::Schema.filename(for_prefix: 'eis')}">
<eis:ident cc="EE">37605030299</eis:ident>
<eis:legalDocument type="pdf">dGVzdCBmYWlsCg==</eis:legalDocument>
</eis:extdata>
@ -60,10 +60,10 @@ class DeserializersXmlIdentTest < ActiveSupport::TestCase
def test_returns_complete_hash_when_valid
xml_string = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<epp xmlns="#{Xsd::Schema.filename(for_prefix: 'epp-ee')}">
<command>
<delete>
<contact:delete xmlns:contact="https://epp.tld.ee/schema/contact-ee-1.1.xsd">
<contact:delete xmlns:contact="#{Xsd::Schema.filename(for_prefix: 'contact-ee')}">
<contact:id>FIRST0:SH2027223711</contact:id>
<contact:authInfo>
<contact:pw>wrong password</contact:pw>
@ -71,7 +71,7 @@ class DeserializersXmlIdentTest < ActiveSupport::TestCase
</contact:delete>
</delete>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:extdata xmlns:eis="#{Xsd::Schema.filename(for_prefix: 'eis')}">
<eis:ident type="priv" cc="EE">37605030299</eis:ident>
<eis:legalDocument type="pdf">dGVzdCBmYWlsCg==</eis:legalDocument>
</eis:extdata>