Fix valid_to #2741

This commit is contained in:
Martin Lensment 2015-07-28 13:08:02 +03:00
parent 1a10b1400b
commit 0ea07de2d1
5 changed files with 23 additions and 2 deletions

View file

@ -160,6 +160,17 @@ describe Pricelist do
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 1.10
Fabricate.create(:pricelist, {
category: 'ee',
operation_category: 'create',
duration: '1year',
price: 2.10,
valid_from: Time.zone.now.to_date,
valid_to: Time.zone.now.to_date
})
Pricelist.pricelist_for('ee', 'create', '1year').price.amount.should == 2.10
Fabricate.create(:pricelist, {
category: 'ee',
operation_category: 'create',