diff --git a/test/integration/epp/domain/create/base_test.rb b/test/integration/epp/domain/create/base_test.rb
index e3b7a39ee..c0cef74b8 100644
--- a/test/integration/epp/domain/create/base_test.rb
+++ b/test/integration/epp/domain/create/base_test.rb
@@ -76,6 +76,233 @@ class EppDomainCreateBaseTest < EppTestCase
assert_epp_response :required_parameter_missing
end
+ def test_create_domain_with_unique_contact
+ now = Time.zone.parse('2010-07-05')
+ travel_to now
+ name = "new.#{dns_zones(:one).origin}"
+ contact = contacts(:john)
+ registrant = contact.becomes(Registrant)
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{name}
+ #{registrant.code}
+ #{contacts(:jane).code}
+ #{contacts(:william).code}
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+ assert_difference 'Domain.count' do
+ post epp_create_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ end
+ assert_epp_response :completed_successfully
+ end
+
+
+ def test_create_domain_with_array_of_not_unique_admins_and_techs
+ now = Time.zone.parse('2010-07-05')
+ travel_to now
+ name = "new.#{dns_zones(:one).origin}"
+ contact = contacts(:john)
+ registrant = contact.becomes(Registrant)
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{name}
+ #{registrant.code}
+ #{contact.code}
+ #{contact.code}
+ #{contact.code}
+ #{contact.code}
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+
+
+ assert_no_difference 'Domain.count' do
+ post epp_create_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ end
+ assert_epp_response :parameter_value_policy_error
+ end
+
+ def test_create_domain_with_array_of_not_unique_admins
+ now = Time.zone.parse('2010-07-05')
+ travel_to now
+ name = "new.#{dns_zones(:one).origin}"
+ contact = contacts(:john)
+ registrant = contact.becomes(Registrant)
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{name}
+ #{registrant.code}
+ #{contact.code}
+ #{contact.code}
+ #{contact.code}
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+
+
+ assert_no_difference 'Domain.count' do
+ post epp_create_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ end
+
+ assert_epp_response :parameter_value_policy_error
+ end
+
+ def test_create_domain_with_array_of_not_unique_techs
+ now = Time.zone.parse('2010-07-05')
+ travel_to now
+ name = "new.#{dns_zones(:one).origin}"
+ contact = contacts(:john)
+ registrant = contact.becomes(Registrant)
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{name}
+ #{registrant.code}
+ #{contact.code}
+ #{contact.code}
+ #{contact.code}
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+ assert_no_difference 'Domain.count' do
+ post epp_create_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ end
+
+ assert_epp_response :parameter_value_policy_error
+ end
+
+ def test_create_domain_with_array_of_not_unique_admin_but_tech_another_one
+ now = Time.zone.parse('2010-07-05')
+ travel_to now
+ name = "new.#{dns_zones(:one).origin}"
+ contact = contacts(:john)
+ registrant = contact.becomes(Registrant)
+ contact_two = contacts(:william)
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{name}
+ #{registrant.code}
+ #{contact.code}
+ #{contact.code}
+ #{contact_two.code}
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+ assert_no_difference 'Domain.count' do
+ post epp_create_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ end
+
+ assert_epp_response :parameter_value_policy_error
+ end
+
+ def test_create_domain_with_array_of_not_unique_techs_but_admin_another_one
+ now = Time.zone.parse('2010-07-05')
+ travel_to now
+ name = "new.#{dns_zones(:one).origin}"
+ contact = contacts(:john)
+ registrant = contact.becomes(Registrant)
+ contact_two = contacts(:william)
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{name}
+ #{registrant.code}
+ #{contact_two.code}
+ #{contact.code}
+ #{contact.code}
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+ assert_no_difference 'Domain.count' do
+ post epp_create_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ end
+
+ assert_epp_response :parameter_value_policy_error
+ end
+
def test_registers_new_domain_with_required_attributes
now = Time.zone.parse('2010-07-05')
travel_to now