make supporting version for schema

This commit is contained in:
Oleg Hasjanov 2021-06-25 14:27:40 +03:00
parent 4917a2cb00
commit 1665e6e71e
11 changed files with 48 additions and 14 deletions

View file

@ -38,6 +38,7 @@ class EppDomainCreateBaseTest < EppTestCase
</command>
</epp>
XML
assert_no_difference 'Domain.count' do
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }

View file

@ -66,7 +66,7 @@ class EppDomainInfoBaseTest < EppTestCase
<epp xmlns="#{Xsd::Schema.filename(for_prefix: 'epp-ee')}">
<command>
<info>
<domain:info xmlns:domain="#{Xsd::Schema.filename(for_prefix: 'domain-eis')}">
<domain:info xmlns:domain="#{Xsd::Schema.filename(for_prefix: 'domain-eis', for_version: '1.0')}">
<domain:name>shop.test</domain:name>
</domain:info>
</info>

View file

@ -8,13 +8,13 @@ class XsdSchemaTest < ActiveSupport::TestCase
end
def test_single_part_name
filename = Xsd::Schema.filename(schema_path: @schema_path, for_prefix: 'abcde')
filename = Xsd::Schema.filename(schema_path: @schema_path, for_prefix: 'abcde', for_version: '1.2')
assert_equal Xsd::Schema::BASE_URL + 'abcde-1.2.xsd', filename
end
def test_double_part_name
filename = Xsd::Schema.filename(schema_path: @schema_path, for_prefix: 'abcde-fghij')
filename = Xsd::Schema.filename(schema_path: @schema_path, for_prefix: 'abcde-fghij', for_version: '1.3')
assert_equal Xsd::Schema::BASE_URL + 'abcde-fghij-1.3.xsd', filename
end