diff --git a/test/integration/epp/base_test.rb b/test/integration/epp/base_test.rb
index eb02c42e8..a07ab767c 100644
--- a/test/integration/epp/base_test.rb
+++ b/test/integration/epp/base_test.rb
@@ -13,16 +13,9 @@ class EppBaseTest < EppTestCase
constraints: EppConstraint.new(:poll)
end
- any_valid_epp_request_xml = <<-XML
-
-
-
-
- XML
-
begin
assert_difference 'ApiLog::EppLog.count' do
- post '/epp/command/internal_error', { frame: any_valid_epp_request_xml },
+ post '/epp/command/internal_error', { frame: valid_request_xml },
'HTTP_COOKIE' => 'session=api_bestnames'
end
assert_epp_response :command_failed
@@ -33,14 +26,13 @@ class EppBaseTest < EppTestCase
end
end
- def test_invalid_request
+ def test_validates_request_xml
invalid_xml = <<-XML
XML
- post '/epp/command/internal_error', { frame: invalid_xml },
- 'HTTP_COOKIE' => 'session=api_bestnames'
+ post valid_command_path, { frame: invalid_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
assert_epp_response :syntax_error
end
@@ -87,4 +79,19 @@ class EppBaseTest < EppTestCase
assert_epp_response :authorization_error
end
+
+ private
+
+ def valid_command_path
+ epp_command_poll_path
+ end
+
+ def valid_request_xml
+ <<-XML
+
+
+
+
+ XML
+ end
end