Extend outzone_at and delete_at also on domain renew #2622

This commit is contained in:
Martin Lensment 2015-06-10 16:28:09 +03:00
parent 1e23641e01
commit 9bd832278c
3 changed files with 18 additions and 0 deletions

View file

@ -2070,7 +2070,10 @@ describe 'EPP Domain', epp: true do
it 'should renew a expired domain' do
domain.valid_to = Time.zone.now - 50.days
new_valid_to = domain.valid_to + 1.year
domain.outzone_at = Time.zone.now - 50.days
new_outzone_at = domain.outzone_at + 1.year
new_delete_at = domain.delete_at + 1.year
domain.save
Domain.start_expire_period
@ -2095,6 +2098,11 @@ describe 'EPP Domain', epp: true do
domain.domain_statuses.where(value: DomainStatus::EXPIRED).count.should == 0
domain.domain_statuses.where(value: DomainStatus::SERVER_HOLD).count.should == 0
domain.domain_statuses.where(value: DomainStatus::OK).count.should == 1
domain.reload
domain.valid_to.should be_within(5).of(new_valid_to)
domain.outzone_at.should be_within(5).of(new_outzone_at)
domain.delete_at.should be_within(5).of(new_delete_at)
end
it 'does not renew foreign domain' do