Add EPP blocked domain test #2564

This commit is contained in:
Martin Lensment 2015-07-01 12:54:36 +03:00
parent 9580e834df
commit 2aeba8490f
2 changed files with 13 additions and 0 deletions

View file

@ -16,6 +16,7 @@ describe 'EPP Domain', epp: true do
Fabricate(:contact, code: 'FIXED:SH801333') Fabricate(:contact, code: 'FIXED:SH801333')
Fabricate(:contact, code: 'FIXED:JURIDICAL_1234', ident_type: 'bic') Fabricate(:contact, code: 'FIXED:JURIDICAL_1234', ident_type: 'bic')
Fabricate(:reserved_domain) Fabricate(:reserved_domain)
Fabricate(:blocked_domain)
@uniq_no = proc { @i ||= 0; @i += 1 } @uniq_no = proc { @i ||= 0; @i += 1 }
end end
@ -207,6 +208,15 @@ describe 'EPP Domain', epp: true do
response[:clTRID].should == 'ABC-12345' response[:clTRID].should == 'ABC-12345'
end end
it 'does not create blocked domain' do
xml = domain_create_xml(name: { value: 'ftp.ee' })
response = epp_plain_request(xml)
response[:result_code].should == '2302'
response[:msg].should == 'Domain name is blocked [name_dirty]'
response[:clTRID].should == 'ABC-12345'
end
it 'does not create domain without contacts and registrant' do it 'does not create domain without contacts and registrant' do
xml = domain_create_xml(_anonymus: [], registrant: false) xml = domain_create_xml(_anonymus: [], registrant: false)

View file

@ -0,0 +1,3 @@
Fabricator(:blocked_domain) do
names ['ftp.ee', 'cache.ee']
end