mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 22:46:22 +02:00
List EPP routes explicitly
This commit is contained in:
parent
ddaf9c9cbf
commit
cb3bf7ffdc
26 changed files with 145 additions and 120 deletions
|
@ -14,7 +14,7 @@ class EppContactBaseTest < EppTestCase
|
|||
</command>
|
||||
</epp>
|
||||
XML
|
||||
post '/epp/command/info', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ class EppContactCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/check', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -42,7 +42,7 @@ class EppContactCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/check', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '1', response_xml.at_xpath('//contact:id', contact: xml_schema)['avail']
|
||||
|
@ -65,7 +65,7 @@ class EppContactCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/check', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal '0', response_xml.at_xpath('//contact:id', contact: xml_schema)['avail']
|
||||
|
@ -88,7 +88,7 @@ class EppContactCheckBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/check', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_check_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_equal 3, response_xml.xpath('//contact:cd', contact: xml_schema).size
|
||||
|
|
|
@ -29,7 +29,7 @@ class EppContactCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Contact.count' do
|
||||
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
end
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -68,7 +68,7 @@ class EppContactCreateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session.session_id}"
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => "session=#{session.session_id}"
|
||||
|
||||
contact = Contact.find_by(name: name)
|
||||
assert_equal "#{session.user.registrar.code}:#{code}".upcase, contact.code
|
||||
|
@ -98,7 +98,7 @@ class EppContactCreateBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Contact.count' do
|
||||
post '/epp/command/create', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_create_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
end
|
||||
assert_epp_response :required_parameter_missing
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ class EppContactDeleteBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_difference 'Contact.count', -1 do
|
||||
post '/epp/command/delete', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
end
|
||||
assert_epp_response :completed_successfully
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ class EppContactDeleteBaseTest < EppTestCase
|
|||
XML
|
||||
|
||||
assert_no_difference 'Contact.count' do
|
||||
post '/epp/command/delete', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_delete_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
end
|
||||
assert_epp_response :object_association_prohibits_operation
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ class EppContactInfoBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/info', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_info_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
|
|
|
@ -37,7 +37,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
@contact.reload
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
|
@ -69,7 +69,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
assert_emails 1
|
||||
end
|
||||
|
@ -97,7 +97,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
assert_no_emails
|
||||
end
|
||||
|
@ -128,7 +128,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
assert_no_emails
|
||||
end
|
||||
|
@ -154,7 +154,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
@ -188,7 +188,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</epp>
|
||||
XML
|
||||
assert_no_changes -> { @contact.updated_at } do
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
end
|
||||
assert_epp_response :data_management_policy_violation
|
||||
end
|
||||
|
@ -220,7 +220,7 @@ class EppContactUpdateBaseTest < EppTestCase
|
|||
</command>
|
||||
</epp>
|
||||
XML
|
||||
post '/epp/command/update', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
post epp_update_path, { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
|
||||
assert_epp_response :completed_successfully
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue