From 54da4c991429f710f5b76a4afb0167a70342bf38 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Mon, 25 Jan 2021 16:03:41 +0200 Subject: [PATCH] Test for Illegal chars in DNSkey --- .../epp/domain/create/base_test.rb | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/test/integration/epp/domain/create/base_test.rb b/test/integration/epp/domain/create/base_test.rb index 9d817524d..a026c3eed 100644 --- a/test/integration/epp/domain/create/base_test.rb +++ b/test/integration/epp/domain/create/base_test.rb @@ -2,6 +2,51 @@ require 'test_helper' class EppDomainCreateBaseTest < EppTestCase + def test_some_test + name = "new.#{dns_zones(:one).origin}" + contact = contacts(:john) + registrant = contact.becomes(Registrant) + + pub_key = "AwEAAddt2AkLf\n + \n + YGKgiEZB5SmIF8E\n + vrjxNMH6HtxWEA4RJ9Ao6LCWheg8" + + request_xml = <<-XML + + + + + + #{name} + #{registrant.code} + + + + + + 257 + 3 + 8 + #{pub_key} + + + + #{'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_syntax_error + end + + def test_not_registers_domain_without_legaldoc now = Time.zone.parse('2010-07-05') travel_to now