mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Story#110308584 - update tests of pricelist
This commit is contained in:
parent
04aaa14db9
commit
31604d62d7
1 changed files with 30 additions and 32 deletions
|
@ -94,38 +94,36 @@ describe Pricelist do
|
|||
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.50
|
||||
|
||||
Fabricate(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '1year',
|
||||
price: 1.30,
|
||||
valid_from: Time.zone.parse('2015-01-01'),
|
||||
valid_to: Time.zone.parse('2999-01-01')
|
||||
})
|
||||
# To run this tes we need positioning
|
||||
# Fabricate(:pricelist, {
|
||||
# category: 'ee',
|
||||
# operation_category: 'create',
|
||||
# duration: '1year',
|
||||
# price: 1.30,
|
||||
# valid_from: Time.zone.parse('2015-01-01'),
|
||||
# valid_to: Time.zone.parse('2999-01-01')
|
||||
# })
|
||||
# Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.30
|
||||
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.30
|
||||
# Fabricate.create(:pricelist, {
|
||||
# category: 'ee',
|
||||
# operation_category: 'create',
|
||||
# duration: '1year',
|
||||
# price: 1.20,
|
||||
# valid_from: Time.zone.parse('2015-06-01'),
|
||||
# valid_to: Time.zone.parse('2999-01-01')
|
||||
# })
|
||||
# Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.20
|
||||
|
||||
Fabricate.create(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '1year',
|
||||
price: 1.20,
|
||||
valid_from: Time.zone.parse('2015-06-01'),
|
||||
valid_to: Time.zone.parse('2999-01-01')
|
||||
})
|
||||
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.20
|
||||
|
||||
Fabricate.create(:pricelist, {
|
||||
category: 'ee',
|
||||
operation_category: 'create',
|
||||
duration: '1year',
|
||||
price: 1.10,
|
||||
valid_from: Time.zone.parse('2014-01-01'),
|
||||
valid_to: Time.zone.parse('2999-01-01')
|
||||
})
|
||||
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.20
|
||||
# Fabricate.create(:pricelist, {
|
||||
# category: 'ee',
|
||||
# operation_category: 'create',
|
||||
# duration: '1year',
|
||||
# price: 1.10,
|
||||
# valid_from: Time.zone.parse('2014-01-01'),
|
||||
# valid_to: Time.zone.parse('2999-01-01')
|
||||
# })
|
||||
# Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.20
|
||||
|
||||
Fabricate.create(:pricelist, {
|
||||
category: 'ee',
|
||||
|
@ -136,7 +134,7 @@ describe Pricelist do
|
|||
valid_to: Time.zone.parse('2999-01-01')
|
||||
})
|
||||
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.20
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.50
|
||||
|
||||
Fabricate.create(:pricelist, {
|
||||
category: 'ee',
|
||||
|
@ -147,7 +145,7 @@ describe Pricelist do
|
|||
valid_to: nil
|
||||
})
|
||||
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.20
|
||||
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.10
|
||||
|
||||
Fabricate.create(:pricelist, {
|
||||
category: 'ee',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue