mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
Fail earlier if domain is non-transferable
Regardless of EPP transfer operation #694
This commit is contained in:
parent
126428f38f
commit
4ada9d1bd0
5 changed files with 44 additions and 8 deletions
9
test/fixtures/domains.yml
vendored
9
test/fixtures/domains.yml
vendored
|
@ -28,6 +28,15 @@ library:
|
|||
period: 1
|
||||
period_unit: m
|
||||
|
||||
non_transferable:
|
||||
name: non-transferable.test
|
||||
transfer_code: d382682
|
||||
valid_to: 2010-07-05
|
||||
registrar: bestnames
|
||||
registrant: john
|
||||
statuses:
|
||||
- serverTransferProhibited
|
||||
|
||||
invalid:
|
||||
name: invalid.test
|
||||
transfer_code: any
|
||||
|
|
|
@ -1,7 +1,30 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppDomainTransferBaseTest < ActionDispatch::IntegrationTest
|
||||
def test_does_not_transfer_if_transfer_code_is_wrong
|
||||
def test_non_transferable_domain
|
||||
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>
|
||||
<transfer op="query">
|
||||
<domain:transfer xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>non-transferable.test</domain:name>
|
||||
<domain:authInfo>
|
||||
<domain:pw>d382682</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/transfer', { frame: request_xml }, { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
domains(:shop).reload
|
||||
assert_equal registrars(:bestnames), domains(:shop).registrar
|
||||
assert_equal '2304', Nokogiri::XML(response.body).at_css('result')[:code]
|
||||
end
|
||||
|
||||
def test_wrong_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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue