From 087ab8cfec633a1beeae882001c5dfc164a0f920 Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Mon, 6 Jul 2015 11:26:18 +0300 Subject: [PATCH] Pricelist test #2741g --- spec/models/pricelist_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/models/pricelist_spec.rb b/spec/models/pricelist_spec.rb index d6dc79070..4e841ed94 100644 --- a/spec/models/pricelist_spec.rb +++ b/spec/models/pricelist_spec.rb @@ -159,5 +159,16 @@ describe Pricelist do }) Pricelist.price_for('ee', 'create', '1year').should == 1.10 + + Fabricate.create(:pricelist, { + category: 'ee', + operation_category: 'create', + duration: '2years', + price: 1.20, + valid_from: Time.zone.parse('2015-07-01'), + valid_to: Time.zone.parse('2999-01-01') + }) + + Pricelist.price_for('ee', 'create', '2years').should == 1.20 end end