mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Remove/fix outdated specs
This commit is contained in:
parent
837ef067e7
commit
3bdfb4b4eb
3 changed files with 9 additions and 128 deletions
|
@ -353,118 +353,6 @@ RSpec.describe Domain do
|
|||
domain.statuses.should == ['expired']
|
||||
end
|
||||
|
||||
it 'should know its create price' do
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '1year',
|
||||
price: 1.50,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain)
|
||||
domain.pricelist('create').price.amount.should == 1.50
|
||||
|
||||
domain = Fabricate(:domain, period: 12, period_unit: 'm')
|
||||
domain.pricelist('create').price.amount.should == 1.50
|
||||
|
||||
domain = Fabricate(:domain, period: 365, period_unit: 'd')
|
||||
domain.pricelist('create').price.amount.should == 1.50
|
||||
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '2years',
|
||||
price: 3,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain, period: 2)
|
||||
domain.pricelist('create').price.amount.should == 3.0
|
||||
|
||||
domain = Fabricate(:domain, period: 24, period_unit: 'm')
|
||||
domain.pricelist('create').price.amount.should == 3.0
|
||||
|
||||
domain = Fabricate(:domain, period: 730, period_unit: 'd')
|
||||
domain.pricelist('create').price.amount.should == 3.0
|
||||
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '3years',
|
||||
price: 6,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain, period: 3)
|
||||
domain.pricelist('create').price.amount.should == 6.0
|
||||
|
||||
domain = Fabricate(:domain, period: 36, period_unit: 'm')
|
||||
domain.pricelist('create').price.amount.should == 6.0
|
||||
|
||||
domain = Fabricate(:domain, period: 1095, period_unit: 'd')
|
||||
domain.pricelist('create').price.amount.should == 6.0
|
||||
end
|
||||
|
||||
it 'should know its renew price' do
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'renew',
|
||||
duration: '1year',
|
||||
price: 1.30,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain)
|
||||
domain.pricelist('renew').price.amount.should == 1.30
|
||||
|
||||
domain = Fabricate(:domain, period: 12, period_unit: 'm')
|
||||
domain.pricelist('renew').price.amount.should == 1.30
|
||||
|
||||
domain = Fabricate(:domain, period: 365, period_unit: 'd')
|
||||
domain.pricelist('renew').price.amount.should == 1.30
|
||||
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'renew',
|
||||
duration: '2years',
|
||||
price: 3.1,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain, period: 2)
|
||||
domain.pricelist('renew').price.amount.should == 3.1
|
||||
|
||||
domain = Fabricate(:domain, period: 24, period_unit: 'm')
|
||||
domain.pricelist('renew').price.amount.should == 3.1
|
||||
|
||||
domain = Fabricate(:domain, period: 730, period_unit: 'd')
|
||||
domain.pricelist('renew').price.amount.should == 3.1
|
||||
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'renew',
|
||||
duration: '3years',
|
||||
price: 6.1,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: nil
|
||||
})
|
||||
|
||||
domain = Fabricate(:domain, period: 3)
|
||||
domain.pricelist('renew').price.amount.should == 6.1
|
||||
|
||||
domain = Fabricate(:domain, period: 36, period_unit: 'm')
|
||||
domain.pricelist('renew').price.amount.should == 6.1
|
||||
|
||||
domain = Fabricate(:domain, period: 1095, period_unit: 'd')
|
||||
domain.pricelist('renew').price.amount.should == 6.1
|
||||
end
|
||||
|
||||
it 'should set pending update' do
|
||||
@domain.statuses = DomainStatus::OK # restore
|
||||
@domain.save
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue