mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
e313f2c756
9 changed files with 145 additions and 29 deletions
|
@ -37,6 +37,22 @@ describe Domain do
|
|||
it 'should not be registrant update confirm ready' do
|
||||
@domain.registrant_update_confirmable?('123').should == false
|
||||
end
|
||||
|
||||
it 'should not have pending update' do
|
||||
@domain.pending_update?.should == false
|
||||
end
|
||||
|
||||
it 'should allow pending update' do
|
||||
@domain.pending_update_prohibited?.should == false
|
||||
end
|
||||
|
||||
it 'should not have pending delete' do
|
||||
@domain.pending_delete?.should == false
|
||||
end
|
||||
|
||||
it 'should allow pending delete' do
|
||||
@domain.pending_delete_prohibited?.should == false
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
|
@ -328,6 +344,44 @@ describe Domain do
|
|||
domain.pricelist('renew').price.amount.should == 6.1
|
||||
end
|
||||
|
||||
it 'should set pending update' do
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
@domain.pending_update?.should == false
|
||||
|
||||
@domain.set_pending_update
|
||||
@domain.pending_update?.should == true
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
end
|
||||
|
||||
it 'should not set pending update' do
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
@domain.statuses << DomainStatus::CLIENT_UPDATE_PROHIBITED
|
||||
|
||||
@domain.set_pending_update.should == nil # not updated
|
||||
@domain.pending_update?.should == false
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
end
|
||||
|
||||
it 'should set pending delete' do
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
@domain.pending_delete?.should == false
|
||||
|
||||
@domain.set_pending_delete.should == ['pendingDelete']
|
||||
@domain.pending_delete?.should == true
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
end
|
||||
|
||||
it 'should not set pending delele' do
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
@domain.pending_delete?.should == false
|
||||
@domain.statuses << DomainStatus::CLIENT_DELETE_PROHIBITED
|
||||
|
||||
@domain.set_pending_delete.should == nil
|
||||
|
||||
@domain.pending_delete?.should == false
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
end
|
||||
|
||||
context 'about registrant update confirm' do
|
||||
before :all do
|
||||
@domain.registrant_verification_token = 123
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue