Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
DinSmol committed Oct 7, 2021
1 parent 2f34965 commit 5545cf0
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion test/system/registrar_area/xml_consoles_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ def test_epp_server_does_not_response

def test_update_dnskey
@domain = domains(:shop)
@dnskey = dnskeys(:one)
@dnskeynew = dnskeys(:two)
visit registrar_xml_console_path
fill_in 'payload', with: schema_dnskey_rem(@dnskey)
click_on 'Send EPP Request'
fill_in 'payload', with: schema_dnskey_rem(@dnskeynew)
click_on 'Send EPP Request'

visit registrar_xml_console_path
fill_in 'payload', with: schema_dnskey_add
click_on 'Send EPP Request'
Expand All @@ -39,8 +47,35 @@ def test_update_dnskey

private

def schema_dnskey_rem(key)
<<~XML
<?xml version="1.0" encoding="utf-8"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd" xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.2.xsd" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://epp.tld.ee/schema/epp-ee-1.0.xsd epp-ee-1.0.xsd https://epp.tld.ee/schema/domain-ee-1.2.xsd domain-ee-1.2.xsd urn:ietf:params:xml:ns:secDNS-1.1 secDNS-1.1.xsd https://epp.tld.ee/schema/eis-1.0.xsd eis-1.0.xsd">
<command>
<update>
<domain:update>
<domain:name>shop.test</domain:name>
</domain:update>
</update>
<extension>
<secDNS:update>
<secDNS:rem>
<secDNS:keyData>
<secDNS:flags>#{key.flags}</secDNS:flags>
<secDNS:protocol>#{key.protocol}</secDNS:protocol>
<secDNS:alg>#{key.alg}</secDNS:alg>
<secDNS:pubKey>#{key.public_key}</secDNS:pubKey>
</secDNS:keyData>
</secDNS:rem>
</secDNS:update>
</extension>
<clTRID>0.04946500 1632965705</clTRID>
</command>
</epp>
XML
end

def schema_dnskey_add
@dnskey = dnskeys(:one)
<<~XML
<?xml version="1.0" encoding="utf-8"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd" xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.2.xsd" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://epp.tld.ee/schema/epp-ee-1.0.xsd epp-ee-1.0.xsd https://epp.tld.ee/schema/domain-ee-1.2.xsd domain-ee-1.2.xsd urn:ietf:params:xml:ns:secDNS-1.1 secDNS-1.1.xsd https://epp.tld.ee/schema/eis-1.0.xsd eis-1.0.xsd">
Expand Down

0 comments on commit 5545cf0

Please sign in to comment.