mirror of
https://github.com/internetee/registry.git
synced 2025-06-09 06:04:56 +02:00
updated approach for loading schemas in xml console
This commit is contained in:
parent
ad23a7cbd2
commit
5b8b18f584
18 changed files with 258 additions and 55 deletions
37
test/system/registrar_area/xml_consoles_test.rb
Normal file
37
test/system/registrar_area/xml_consoles_test.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
require 'application_system_test_case'
|
||||
|
||||
class RegistrarAreaXmlConsolesTest < ApplicationSystemTestCase
|
||||
|
||||
setup do
|
||||
sign_in users(:api_bestnames)
|
||||
end
|
||||
|
||||
# CodeRay
|
||||
|
||||
def test_epp_server_does_not_response
|
||||
visit registrar_xml_console_path
|
||||
fill_in 'payload', with: schema_example
|
||||
click_on 'Send EPP Request'
|
||||
|
||||
el = page.find('.CodeRay', visible: :all)
|
||||
assert el.text.include? 'CONNECTION ERROR - Is the EPP server running?'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def schema_example
|
||||
request_xml = <<~XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="#{Xsd::Schema.filename(for_prefix: 'epp-ee')}">
|
||||
<command>
|
||||
<check>
|
||||
<domain:check xmlns:domain="#{Xsd::Schema.filename(for_prefix: 'domain-ee')}">
|
||||
<domain:name>auction.test</domain:name>
|
||||
</domain:check>
|
||||
</check>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue