Do not allow foreign domain renew #2629

This commit is contained in:
Martin Lensment 2015-06-03 15:14:52 +03:00
parent c1b5fc8265
commit 1db3486e65
3 changed files with 17 additions and 2 deletions

View file

@ -1993,6 +1993,21 @@ describe 'EPP Domain', epp: true do
response[:results][0][:value].should == '4'
end
it 'does not renew foreign domain' do
login_as :registrar2 do
exp_date = 1.year.since.to_date
xml = @epp_xml.domain.renew(
name: { value: domain.name },
curExpDate: { value: exp_date.to_s },
period: { value: '1', attrs: { unit: 'y' } }
)
response = epp_plain_request(xml)
response[:results][0][:msg].should == 'Authorization error'
response[:results][0][:result_code].should == '2201'
end
end
### INFO ###
it 'returns domain info' do
domain.domain_statuses.build(value: DomainStatus::CLIENT_HOLD, description: 'Payment overdue.')