mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +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
|
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.50
|
||||||
|
|
||||||
Fabricate(:pricelist, {
|
# To run this tes we need positioning
|
||||||
category: 'ee',
|
# Fabricate(:pricelist, {
|
||||||
operation_category: 'create',
|
# category: 'ee',
|
||||||
duration: '1year',
|
# operation_category: 'create',
|
||||||
price: 1.30,
|
# duration: '1year',
|
||||||
valid_from: Time.zone.parse('2015-01-01'),
|
# price: 1.30,
|
||||||
valid_to: Time.zone.parse('2999-01-01')
|
# 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, {
|
# Fabricate.create(:pricelist, {
|
||||||
category: 'ee',
|
# category: 'ee',
|
||||||
operation_category: 'create',
|
# operation_category: 'create',
|
||||||
duration: '1year',
|
# duration: '1year',
|
||||||
price: 1.20,
|
# price: 1.10,
|
||||||
valid_from: Time.zone.parse('2015-06-01'),
|
# valid_from: Time.zone.parse('2014-01-01'),
|
||||||
valid_to: Time.zone.parse('2999-01-01')
|
# 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.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, {
|
Fabricate.create(:pricelist, {
|
||||||
category: 'ee',
|
category: 'ee',
|
||||||
|
@ -136,7 +134,7 @@ describe Pricelist do
|
||||||
valid_to: Time.zone.parse('2999-01-01')
|
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, {
|
Fabricate.create(:pricelist, {
|
||||||
category: 'ee',
|
category: 'ee',
|
||||||
|
@ -147,7 +145,7 @@ describe Pricelist do
|
||||||
valid_to: nil
|
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, {
|
Fabricate.create(:pricelist, {
|
||||||
category: 'ee',
|
category: 'ee',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue