diff --git a/app/controllers/registrar/xml_consoles_controller.rb b/app/controllers/registrar/xml_consoles_controller.rb
index fef6b33ad..fd6804159 100644
--- a/app/controllers/registrar/xml_consoles_controller.rb
+++ b/app/controllers/registrar/xml_consoles_controller.rb
@@ -29,16 +29,34 @@ class Registrar
render plain: xml
end
- protected
+ private
def prepare_payload(xml, cl_trid)
PREFS.map do |pref|
- xml.gsub!('"' + pref.to_s + '"',
- "\"#{Xsd::Schema.filename(for_prefix: pref.to_s)}\"")
+ xml = load_schema_by_prefix(pref, xml)
end
xml.gsub!('ABC-12345', "#{cl_trid}")
xml
end
+
+ def load_schema_by_prefix(pref, xml)
+ case pref
+ when 'epp-ee'
+ insert_prefix_and_version(xml, pref, '1.0')
+ when 'eis'
+ insert_prefix_and_version(xml, pref, '1.0')
+ when 'contact-ee'
+ insert_prefix_and_version(xml, pref, '1.1')
+ else
+ insert_prefix_and_version(xml, pref, '1.1')
+ end
+ end
+
+ def insert_prefix_and_version(xml, pref, version)
+ xml.gsub!('"' + pref.to_s + '"',
+ "\"#{Xsd::Schema.filename(for_prefix: pref.to_s, for_version: version)}\"")
+ xml
+ end
end
end
diff --git a/app/views/epp/contacts/check.xml.builder b/app/views/epp/contacts/check.xml.builder
index 8e265b02f..6b4ea4cc7 100644
--- a/app/views/epp/contacts/check.xml.builder
+++ b/app/views/epp/contacts/check.xml.builder
@@ -5,7 +5,8 @@ xml.epp_head do
end
xml.resData do
- xml.tag!('contact:chkData', 'xmlns:contact' => Xsd::Schema.filename(for_prefix: 'contact-ee')) do
+ xml.tag!('contact:chkData', 'xmlns:contact' =>
+ Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1')) do
@results.each do |result|
xml.tag!('contact:cd') do
xml.tag! "contact:id", result[:code], avail: result[:avail]
diff --git a/app/views/epp/contacts/info.xml.builder b/app/views/epp/contacts/info.xml.builder
index 525396772..053565c09 100644
--- a/app/views/epp/contacts/info.xml.builder
+++ b/app/views/epp/contacts/info.xml.builder
@@ -5,7 +5,8 @@ xml.epp_head do
end
xml.resData do
- xml.tag!('contact:infData', 'xmlns:contact' => Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1')) do
+ xml.tag!('contact:infData', 'xmlns:contact' =>
+ Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1')) do
xml.tag!('contact:id', @contact.code)
xml.tag!('contact:roid', @contact.roid)
@@ -78,7 +79,8 @@ xml.epp_head do
end
if can? :view_full_info, @contact, @password
xml.tag!('extension') do
- xml.tag!('eis:extdata', 'xmlns:eis' => Xsd::Schema.filename(for_prefix: 'eis', for_version: '1.0')) do
+ xml.tag!('eis:extdata', 'xmlns:eis' =>
+ Xsd::Schema.filename(for_prefix: 'eis', for_version: '1.0')) do
xml.tag!('eis:ident', @contact.ident,
type: @contact.ident_type, cc: @contact.ident_country_code)
end
diff --git a/app/views/epp/contacts/save.xml.builder b/app/views/epp/contacts/save.xml.builder
index 2fd3737e3..c3f3a6059 100644
--- a/app/views/epp/contacts/save.xml.builder
+++ b/app/views/epp/contacts/save.xml.builder
@@ -5,9 +5,10 @@ xml.epp_head do
end
xml.resData do
- xml.tag!('contact:creData', 'xmlns:contact' => Xsd::Schema.filename(for_prefix: 'contact-ee')) do
- xml.tag!('contact:id', @contact.code)
- xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
+ xml.tag!('contact:creData', 'xmlns:contact' =>
+ Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1')) do
+ xml.tag!('contact:id', @contact.code)
+ xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
end
end
diff --git a/app/views/epp/domains/partials/_transfer.xml.builder b/app/views/epp/domains/partials/_transfer.xml.builder
index dbe8ad384..31ed3dfe6 100644
--- a/app/views/epp/domains/partials/_transfer.xml.builder
+++ b/app/views/epp/domains/partials/_transfer.xml.builder
@@ -1,4 +1,5 @@
-builder.tag!('domain:trnData', 'xmlns:domain' => Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: @schema_version)) do
+builder.tag!('domain:trnData', 'xmlns:domain' =>
+ Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: @schema_version)) do
builder.tag!('domain:name', dt.domain_name)
builder.tag!('domain:trStatus', dt.status)
builder.tag!('domain:reID', dt.new_registrar.code)
diff --git a/app/views/epp/sessions/greeting.xml.builder b/app/views/epp/sessions/greeting.xml.builder
index 054307652..fbaae0dfc 100644
--- a/app/views/epp/sessions/greeting.xml.builder
+++ b/app/views/epp/sessions/greeting.xml.builder
@@ -5,12 +5,12 @@ xml.epp_head do
xml.svcMenu do
xml.version '1.0'
xml.lang 'en'
- xml.objURI Xsd::Schema.filename(for_prefix: 'domain-ee')
- xml.objURI Xsd::Schema.filename(for_prefix: 'contact-ee')
+ xml.objURI Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: @schema_version)
+ xml.objURI Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: @schema_version)
xml.objURI 'urn:ietf:params:xml:ns:host-1.0'
xml.svcExtension do
xml.extURI 'urn:ietf:params:xml:ns:secDNS-1.1'
- xml.extURI Xsd::Schema.filename(for_prefix: 'eis')
+ xml.extURI Xsd::Schema.filename(for_prefix: 'eis', for_version: @schema_version)
end
end
diff --git a/lib/epp_constraint.rb b/lib/epp_constraint.rb
index 845671173..d7e37bfe3 100644
--- a/lib/epp_constraint.rb
+++ b/lib/epp_constraint.rb
@@ -2,9 +2,10 @@ class EppConstraint
OBJECT_TYPES = {
domain: [
{ domain: Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1') },
+ { domain: Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.2') },
{ domain: Xsd::Schema.filename(for_prefix: 'domain-eis', for_version: '1.0') },
],
- contact: { contact: Xsd::Schema.filename(for_prefix: 'contact-ee') },
+ contact: { contact: Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1') },
}.freeze
def initialize(type)
diff --git a/lib/gem_monkey_patches/builder.rb b/lib/gem_monkey_patches/builder.rb
index 550239999..9bd4fbcea 100644
--- a/lib/gem_monkey_patches/builder.rb
+++ b/lib/gem_monkey_patches/builder.rb
@@ -3,7 +3,7 @@ module Builder
def epp_head
instruct!
epp(
- 'xmlns' => ::Xsd::Schema.filename(for_prefix: 'epp-ee'),
+ 'xmlns' => ::Xsd::Schema.filename(for_prefix: 'epp-ee', for_version: '1.0'),
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'lib/schemas/epp-ee-1.0.xsd'
) do
diff --git a/lib/schemas/domain-ee-1.2.xsd b/lib/schemas/domain-ee-1.2.xsd
new file mode 100644
index 000000000..073986ac7
--- /dev/null
+++ b/lib/schemas/domain-ee-1.2.xsd
@@ -0,0 +1,472 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Extensible Provisioning Protocol v1.0
+ domain provisioning schema.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/xsd/schema.rb b/lib/xsd/schema.rb
index 0f3897114..b48237053 100644
--- a/lib/xsd/schema.rb
+++ b/lib/xsd/schema.rb
@@ -27,7 +27,7 @@ module Xsd
def initialize(params)
schema_path = params.fetch(:schema_path, SCHEMA_PATH)
@for_prefix = params.fetch(:for_prefix)
- @for_version = params.fetch(:for_version, '1.1')
+ @for_version = params[:for_version] || '1.1'
@xsd_schemas = Dir.entries(schema_path).select { |f| File.file? File.join(schema_path, f) }
end
@@ -48,21 +48,20 @@ module Xsd
schemas.each do |schema|
actual_schema = assigment_actual_version(schema)
+ break unless actual_schema.empty?
end
actual_schema
end
def assigment_actual_version(schema)
- result = return_some(schema)
+ result = return_parsed_schema(schema)
actual_schema = schema if result[:version] == @for_version
- actual_schema = 'epp-ee-1.0.xsd' if result[:prefix] == 'epp-ee'
- actual_schema = 'eis-1.0.xsd' if result[:prefix] == 'eis'
actual_schema.to_s
end
- def return_some(data)
+ def return_parsed_schema(data)
res = data.to_s.match(REGEX_PREFIX_WITH_DASH)
res = data.to_s.match(REGEX_PREFIX_WITHOUT_DASH) if res.nil?
res
diff --git a/test/integration/admin_area/domain_update_confirms_test.rb b/test/integration/admin_area/domain_update_confirms_test.rb
index 5d26a004a..3cd64a872 100644
--- a/test/integration/admin_area/domain_update_confirms_test.rb
+++ b/test/integration/admin_area/domain_update_confirms_test.rb
@@ -15,10 +15,10 @@ class AdminAreaBlockedDomainsIntegrationTest < JavaScriptApplicationSystemTestCa
puts new_registrant.name
request_xml = <<-XML
-
+
-
+
#{@domain.name}
#{new_registrant.code}
@@ -26,7 +26,7 @@ class AdminAreaBlockedDomainsIntegrationTest < JavaScriptApplicationSystemTestCa
-
+
#{'test' * 2000}
@@ -50,10 +50,10 @@ class AdminAreaBlockedDomainsIntegrationTest < JavaScriptApplicationSystemTestCa
@domain.registrant
request_xml = <<-XML
-
+
-
+
#{@domain.name}
#{new_registrant.code}
@@ -61,7 +61,7 @@ class AdminAreaBlockedDomainsIntegrationTest < JavaScriptApplicationSystemTestCa
-
+
#{'test' * 2000}
diff --git a/test/integration/admin_area/epp_logs_test.rb b/test/integration/admin_area/epp_logs_test.rb
index 221e05f8c..82c450fad 100644
--- a/test/integration/admin_area/epp_logs_test.rb
+++ b/test/integration/admin_area/epp_logs_test.rb
@@ -41,7 +41,7 @@ class AdminEppLogsIntegrationTest < ApplicationSystemTestCase
def send_epp_request_hello
request_xml = <<-XML
-
+
XML
diff --git a/test/integration/epp/base_test.rb b/test/integration/epp/base_test.rb
index 56ea3f2e8..4aa89e1ed 100644
--- a/test/integration/epp/base_test.rb
+++ b/test/integration/epp/base_test.rb
@@ -37,7 +37,7 @@ class EppBaseTest < EppTestCase
def test_wrong_path_xml
wrong_path_xml = <<-XML
-
+
@@ -63,7 +63,7 @@ class EppBaseTest < EppTestCase
def test_error_with_unknown_command
invalid_xml = <<-XML
-
+
XML
@@ -76,7 +76,7 @@ class EppBaseTest < EppTestCase
def test_validates_request_xml
invalid_xml = <<-XML
-
+
XML
post valid_command_path, params: { frame: invalid_xml },
@@ -88,10 +88,10 @@ class EppBaseTest < EppTestCase
def test_anonymous_user
xml_of_epp_command_that_requires_authentication = <<-XML
-
+
-
+
#{domains(:shop).name}
@@ -112,10 +112,10 @@ class EppBaseTest < EppTestCase
xml_of_epp_command_that_requires_authorization = <<-XML
-
+
-
+
#{domains(:shop).name}
@@ -138,10 +138,10 @@ class EppBaseTest < EppTestCase
authentication_enabled_epp_request_xml = <<-XML
-
+
-
+
#{domains(:shop).name}
@@ -165,10 +165,10 @@ class EppBaseTest < EppTestCase
authentication_enabled_epp_request_xml = <<-XML
-
+
-
+
#{domains(:shop).name}
@@ -194,7 +194,7 @@ class EppBaseTest < EppTestCase
def valid_request_xml
<<-XML
-
+
XML
diff --git a/test/integration/epp/contact/base_test.rb b/test/integration/epp/contact/base_test.rb
index 2767fe277..f26851ee1 100644
--- a/test/integration/epp/contact/base_test.rb
+++ b/test/integration/epp/contact/base_test.rb
@@ -4,10 +4,10 @@ class EppContactBaseTest < EppTestCase
def test_non_existent_contact
request_xml = <<-XML
-
+
-
+
non-existent
diff --git a/test/integration/epp/contact/check/base_test.rb b/test/integration/epp/contact/check/base_test.rb
index 549cdf3ae..f1b9f4d16 100644
--- a/test/integration/epp/contact/check/base_test.rb
+++ b/test/integration/epp/contact/check/base_test.rb
@@ -10,10 +10,10 @@ class EppContactCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
@@ -33,10 +33,10 @@ class EppContactCheckBaseTest < EppTestCase
def test_contact_is_available
request_xml = <<-XML
-
+
-
+
non-existing-id
@@ -59,10 +59,10 @@ class EppContactCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
@@ -82,10 +82,10 @@ class EppContactCheckBaseTest < EppTestCase
def test_multiple_contacts
request_xml = <<-XML
-
+
-
+
one.test
two.test
three.test
@@ -109,10 +109,10 @@ class EppContactCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
BESTNAMES:JOHN-001
@@ -136,10 +136,10 @@ class EppContactCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
JOHN-001
@@ -160,6 +160,6 @@ class EppContactCheckBaseTest < EppTestCase
private
def xml_schema
- Xsd::Schema.filename(for_prefix: 'contact-ee')
+ Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1')
end
end
diff --git a/test/integration/epp/contact/create/base_test.rb b/test/integration/epp/contact/create/base_test.rb
index cc91a74a0..b2b65a7ef 100644
--- a/test/integration/epp/contact/create/base_test.rb
+++ b/test/integration/epp/contact/create/base_test.rb
@@ -8,10 +8,10 @@ class EppContactCreateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{name}
@@ -20,7 +20,7 @@ class EppContactCreateBaseTest < EppTestCase
-
+
any
@@ -88,10 +88,10 @@ class EppContactCreateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{name}
@@ -100,7 +100,7 @@ class EppContactCreateBaseTest < EppTestCase
-
+
any
@@ -125,10 +125,10 @@ class EppContactCreateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{code}
#{name}
@@ -138,7 +138,7 @@ class EppContactCreateBaseTest < EppTestCase
-
+
any
@@ -158,10 +158,10 @@ class EppContactCreateBaseTest < EppTestCase
def test_fails_when_required_attributes_are_missing
request_xml = <<-XML
-
+
-
+
\s
@@ -170,7 +170,7 @@ class EppContactCreateBaseTest < EppTestCase
-
+
test
@@ -194,10 +194,10 @@ class EppContactCreateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{name}
@@ -213,7 +213,7 @@ class EppContactCreateBaseTest < EppTestCase
-
+
123
@@ -255,10 +255,10 @@ class EppContactCreateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{name}
@@ -274,7 +274,7 @@ class EppContactCreateBaseTest < EppTestCase
-
+
123
diff --git a/test/integration/epp/contact/delete/base_test.rb b/test/integration/epp/contact/delete/base_test.rb
index a90974189..d7af361d5 100644
--- a/test/integration/epp/contact/delete/base_test.rb
+++ b/test/integration/epp/contact/delete/base_test.rb
@@ -9,10 +9,10 @@ class EppContactDeleteBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{contact.code}
@@ -39,10 +39,10 @@ class EppContactDeleteBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{contact.code.upcase}
@@ -68,10 +68,10 @@ class EppContactDeleteBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{contact.code.upcase}
@@ -97,10 +97,10 @@ class EppContactDeleteBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{contact.code}
diff --git a/test/integration/epp/contact/info/base_test.rb b/test/integration/epp/contact/info/base_test.rb
index b43273a88..dc8fcd5f7 100644
--- a/test/integration/epp/contact/info/base_test.rb
+++ b/test/integration/epp/contact/info/base_test.rb
@@ -18,10 +18,10 @@ class EppContactInfoBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
@@ -51,10 +51,10 @@ class EppContactInfoBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
TEST:JOHN-001
@@ -78,10 +78,10 @@ class EppContactInfoBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
JOHN-001
@@ -108,10 +108,10 @@ class EppContactInfoBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{@contact.code}
@@ -132,6 +132,6 @@ class EppContactInfoBaseTest < EppTestCase
private
def xml_schema
- Xsd::Schema.filename(for_prefix: 'contact-ee')
+ Xsd::Schema.filename(for_prefix: 'contact-ee', for_version: '1.1')
end
end
diff --git a/test/integration/epp/contact/transfer/base_test.rb b/test/integration/epp/contact/transfer/base_test.rb
index cf28c32c7..a617d7c1d 100644
--- a/test/integration/epp/contact/transfer/base_test.rb
+++ b/test/integration/epp/contact/transfer/base_test.rb
@@ -5,10 +5,10 @@ class EppContactTransferBaseTest < EppTestCase
def test_not_implemented
request_xml = <<-XML
-
+
-
+
any
diff --git a/test/integration/epp/contact/update/base_test.rb b/test/integration/epp/contact/update/base_test.rb
index 081d37c05..364741f0c 100644
--- a/test/integration/epp/contact/update/base_test.rb
+++ b/test/integration/epp/contact/update/base_test.rb
@@ -19,10 +19,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
@@ -58,10 +58,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
john-new@inbox.test
@@ -89,10 +89,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
john@inbox.test
@@ -122,10 +122,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
john-new@inbox.test
@@ -148,10 +148,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
non-existing
@@ -180,10 +180,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{@contact.code}
@@ -192,7 +192,7 @@ class EppContactUpdateBaseTest < EppTestCase
-
+
#{new_ident_code}
@@ -217,10 +217,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{@contact.code}
@@ -228,7 +228,7 @@ class EppContactUpdateBaseTest < EppTestCase
-
+
#{@contact.ident}
@@ -254,10 +254,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{@contact.code}
@@ -302,10 +302,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{@contact.code}
@@ -351,10 +351,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
#{@contact.code}
@@ -404,10 +404,10 @@ class EppContactUpdateBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
john-001
@@ -419,7 +419,7 @@ class EppContactUpdateBaseTest < EppTestCase
-
+
#{'test' * 2000}
diff --git a/test/integration/epp/domain/base_test.rb b/test/integration/epp/domain/base_test.rb
index 557d25f59..9b117f3d4 100644
--- a/test/integration/epp/domain/base_test.rb
+++ b/test/integration/epp/domain/base_test.rb
@@ -4,10 +4,10 @@ class EppDomainBaseTest < EppTestCase
def test_non_existent_domain
request_xml = <<-XML
-
+
-
+
non-existent.test
@@ -25,7 +25,7 @@ class EppDomainBaseTest < EppTestCase
def test_invalid_path
request_xml = <<-XML
-
+
diff --git a/test/integration/epp/domain/check/auction_test.rb b/test/integration/epp/domain/check/auction_test.rb
index d8a7b5919..ad134794a 100644
--- a/test/integration/epp/domain/check/auction_test.rb
+++ b/test/integration/epp/domain/check/auction_test.rb
@@ -17,10 +17,10 @@ class EppDomainCheckAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
auction.test
@@ -34,8 +34,8 @@ class EppDomainCheckAuctionTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
assert_epp_response :completed_successfully
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'Domain is at auction', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'Domain is at auction', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_idn_ascii_domain_is_unavailable_when_at_auction
@@ -43,10 +43,10 @@ class EppDomainCheckAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
xn--pramiid-n2a.test
@@ -60,8 +60,8 @@ class EppDomainCheckAuctionTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
assert_epp_response :completed_successfully
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'Domain is at auction', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'Domain is at auction', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_idn_unicode_domain_is_unavailable_when_at_auction
@@ -69,10 +69,10 @@ class EppDomainCheckAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
püramiid.test
@@ -86,8 +86,8 @@ class EppDomainCheckAuctionTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
assert_epp_response :completed_successfully
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'Domain is at auction', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'Domain is at auction', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_domain_is_unavailable_when_awaiting_payment
@@ -95,10 +95,10 @@ class EppDomainCheckAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
auction.test
@@ -112,8 +112,8 @@ class EppDomainCheckAuctionTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
assert_epp_response :completed_successfully
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'Awaiting payment', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'Awaiting payment', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_domain_is_available_when_payment_received
@@ -121,10 +121,10 @@ class EppDomainCheckAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
auction.test
@@ -138,7 +138,7 @@ class EppDomainCheckAuctionTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
assert_epp_response :completed_successfully
- assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_nil response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")
+ assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_nil response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")
end
end
diff --git a/test/integration/epp/domain/check/base_test.rb b/test/integration/epp/domain/check/base_test.rb
index f2f85bed3..3a5b9bd76 100644
--- a/test/integration/epp/domain/check/base_test.rb
+++ b/test/integration/epp/domain/check/base_test.rb
@@ -4,10 +4,10 @@ class EppDomainCheckBaseTest < EppTestCase
def test_returns_valid_response
request_xml = <<-XML
-
+
-
+
some.test
@@ -21,16 +21,16 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_epp_response :completed_successfully
assert_correct_against_schema response_xml
- assert_equal 'some.test', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal 'some.test', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_domain_is_available_when_not_registered_or_blocked
request_xml = <<-XML
-
+
-
+
available.test
@@ -43,8 +43,8 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_nil response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")
+ assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_nil response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")
end
def test_domain_is_available_when_reserved
@@ -52,10 +52,10 @@ class EppDomainCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
reserved.test
@@ -68,17 +68,17 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_nil response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")
+ assert_equal '1', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_nil response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")
end
def test_domain_is_unavailable_when_format_is_invalid
request_xml = <<-XML
-
+
-
+
invalid
@@ -91,8 +91,8 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'invalid format', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'invalid format', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_domain_is_unavailable_when_registered
@@ -100,10 +100,10 @@ class EppDomainCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
shop.test
@@ -116,8 +116,8 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'in use', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'in use', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_domain_is_unavailable_when_blocked
@@ -125,10 +125,10 @@ class EppDomainCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
blocked.test
@@ -141,8 +141,8 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'Blocked', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'Blocked', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_domain_is_unavailable_when_zone_with_the_same_origin_exists
@@ -150,10 +150,10 @@ class EppDomainCheckBaseTest < EppTestCase
request_xml = <<-XML
-
+
-
+
test
@@ -166,17 +166,17 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}")['avail']
- assert_equal 'Zone with the same origin exists', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").text
+ assert_equal '0', response_xml.at_xpath('//domain:name', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}")['avail']
+ assert_equal 'Zone with the same origin exists', response_xml.at_xpath('//domain:reason', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").text
end
def test_multiple_domains
request_xml = <<-XML
-
+
-
+
one.test
two.test
three.test
@@ -191,6 +191,6 @@ class EppDomainCheckBaseTest < EppTestCase
response_xml = Nokogiri::XML(response.body)
assert_correct_against_schema response_xml
- assert_equal 3, response_xml.xpath('//domain:cd', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee')}").size
+ assert_equal 3, response_xml.xpath('//domain:cd', 'domain' => "#{Xsd::Schema.filename(for_prefix: 'domain-ee', for_version: '1.1')}").size
end
end
diff --git a/test/integration/epp/domain/create/auction_idn_test.rb b/test/integration/epp/domain/create/auction_idn_test.rb
index 8424c82cb..604b74c7d 100644
--- a/test/integration/epp/domain/create/auction_idn_test.rb
+++ b/test/integration/epp/domain/create/auction_idn_test.rb
@@ -21,16 +21,16 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
request_xml = <<-XML
-
+
-
+
xn--pramiid-n2a.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
@@ -59,16 +59,16 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
request_xml = <<-XML
-
+
-
+
püramiid.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
@@ -96,16 +96,16 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
request_xml = <<-XML
-
+
-
+
xn--pramiid-n2a.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
@@ -133,16 +133,16 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
request_xml = <<-XML
-
+
-
+
püramiid.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
@@ -171,16 +171,16 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
request_xml = <<-XML
-
+
-
+
püramiid.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
auction001
@@ -211,16 +211,16 @@ class EppDomainCreateAuctionIdnTest < EppTestCase
request_xml = <<-XML
-
+
-
+
xn--pramiid-n2a.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
auction001
diff --git a/test/integration/epp/domain/create/auction_test.rb b/test/integration/epp/domain/create/auction_test.rb
index 08ac79ad0..cd20f2dac 100644
--- a/test/integration/epp/domain/create/auction_test.rb
+++ b/test/integration/epp/domain/create/auction_test.rb
@@ -13,16 +13,16 @@ class EppDomainCreateAuctionTest < EppTestCase
def test_registers_domain_without_registration_code_when_not_at_auction
request_xml = <<-XML
-
+
-
+
not-at-auction.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
@@ -50,16 +50,16 @@ class EppDomainCreateAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
auction.test
#{contacts(:john).code}
-
+
#{'test' * 2000}
auction002
@@ -85,16 +85,16 @@ class EppDomainCreateAuctionTest < EppTestCase
request_xml = <<-XML
-
+
-
+
auction.test
#{contacts(:john).code}
-
+
#{'test' * 2000}