mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 12:39:34 +02:00
Set normal statuses for reserved domains #2746
This commit is contained in:
parent
3454faa959
commit
873070cb96
2 changed files with 26 additions and 24 deletions
|
@ -515,7 +515,8 @@ class Domain < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def manage_automatic_statuses
|
def manage_automatic_statuses
|
||||||
statuses << DomainStatus::RESERVED if new_record? && in_reserved_list?
|
# TODO: Remove this line if EIS decides not to create reserved status #2565
|
||||||
|
# statuses << DomainStatus::RESERVED if new_record? && in_reserved_list?
|
||||||
|
|
||||||
# domain_statuses.create(value: DomainStatus::DELETE_CANDIDATE) if delete_candidateable?
|
# domain_statuses.create(value: DomainStatus::DELETE_CANDIDATE) if delete_candidateable?
|
||||||
if statuses.empty? && valid?
|
if statuses.empty? && valid?
|
||||||
|
|
|
@ -242,7 +242,7 @@ describe 'EPP Domain', epp: true do
|
||||||
response[:result_code].should == '1000'
|
response[:result_code].should == '1000'
|
||||||
|
|
||||||
d = Domain.last
|
d = Domain.last
|
||||||
d.statuses.should match_array(['reserved'])
|
d.statuses.should match_array(['ok'])
|
||||||
d.auth_info.should_not == 'abc' # should generate entirely new auth info after domain create
|
d.auth_info.should_not == 'abc' # should generate entirely new auth info after domain create
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1490,32 +1490,33 @@ describe 'EPP Domain', epp: true do
|
||||||
d.pending_update?.should == false
|
d.pending_update?.should == false
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should keep reserved status after reserved domain update' do
|
# TODO: Remove this test if EIS decides not to create reserved status #2565
|
||||||
domain.statuses = ['reserved']
|
# it 'should keep reserved status after reserved domain update' do
|
||||||
domain.save
|
# domain.statuses = ['reserved']
|
||||||
|
# domain.save
|
||||||
|
|
||||||
xml_params = {
|
# xml_params = {
|
||||||
name: { value: domain.name },
|
# name: { value: domain.name },
|
||||||
chg: [
|
# chg: [
|
||||||
registrant: { value: 'FIXED:CITIZEN_1234', attrs: { verified: 'yes' } }
|
# registrant: { value: 'FIXED:CITIZEN_1234', attrs: { verified: 'yes' } }
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
|
|
||||||
response = epp_plain_request(domain_update_xml(xml_params, {}, {
|
# response = epp_plain_request(domain_update_xml(xml_params, {}, {
|
||||||
_anonymus: [
|
# _anonymus: [
|
||||||
legalDocument: {
|
# legalDocument: {
|
||||||
value: 'dGVzdCBmYWlsCg==',
|
# value: 'dGVzdCBmYWlsCg==',
|
||||||
attrs: { type: 'pdf' }
|
# attrs: { type: 'pdf' }
|
||||||
}
|
# }
|
||||||
]
|
# ]
|
||||||
}))
|
# }))
|
||||||
|
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
# response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
# response[:results][0][:result_code].should == '1000'
|
||||||
|
|
||||||
d = Domain.last
|
# d = Domain.last
|
||||||
d.statuses.should match_array(['reserved'])
|
# d.statuses.should match_array(['reserved'])
|
||||||
end
|
# end
|
||||||
|
|
||||||
it 'updates a domain' do
|
it 'updates a domain' do
|
||||||
existing_pw = domain.auth_info
|
existing_pw = domain.auth_info
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue