mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
parent
de58f71756
commit
da07639457
2 changed files with 38 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class Epp::DomainTransferTest < ActionDispatch::IntegrationTest
|
class EppDomainTransferTest < ActionDispatch::IntegrationTest
|
||||||
|
def setup
|
||||||
|
login_as users(:api_goodnames)
|
||||||
|
end
|
||||||
|
|
||||||
def test_transfers_domain
|
def test_transfers_domain
|
||||||
request_xml = <<-XML
|
request_xml = <<-XML
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
@ -20,7 +24,7 @@ class Epp::DomainTransferTest < ActionDispatch::IntegrationTest
|
||||||
|
|
||||||
session_id = epp_sessions(:api_goodnames).session_id
|
session_id = epp_sessions(:api_goodnames).session_id
|
||||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => "session=#{session_id}" }
|
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => "session=#{session_id}" }
|
||||||
assert_response :ok
|
assert_response 200
|
||||||
assert_equal registrars(:goodnames), domains(:shop).registrar
|
assert_equal registrars(:goodnames), domains(:shop).registrar
|
||||||
end
|
end
|
||||||
end
|
end
|
32
test/integration/epp/domain/domain_update_test.rb
Normal file
32
test/integration/epp/domain/domain_update_test.rb
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class EppDomainUpdateTest < ActionDispatch::IntegrationTest
|
||||||
|
def setup
|
||||||
|
login_as users(:api_bestnames)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_updates_transfer_code
|
||||||
|
request_xml = <<-XML
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||||
|
<command>
|
||||||
|
<update>
|
||||||
|
<domain:update xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||||
|
<domain:name>shop.test</domain:name>
|
||||||
|
<domain:chg>
|
||||||
|
<domain:authInfo>
|
||||||
|
<domain:pw>f0ff7d17b0</domain:pw>
|
||||||
|
</domain:authInfo>
|
||||||
|
</domain:chg>
|
||||||
|
</domain:update>
|
||||||
|
</update>
|
||||||
|
</command>
|
||||||
|
</epp>
|
||||||
|
XML
|
||||||
|
|
||||||
|
session_id = epp_sessions(:api_bestnames).session_id
|
||||||
|
post '/epp/command/update', { frame: request_xml }, { 'HTTP_COOKIE' => "session=#{session_id}" }
|
||||||
|
assert_response 200
|
||||||
|
assert_equal 'f0ff7d17b0', domains(:shop).transfer_code
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue