Sha256: e81115c257853a13e0239e165e2085f4b2684094fdc722b9884b815e0bf1a4c9
Contents?: true
Size: 622 Bytes
Versions: 4
Compression:
Stored size: 622 Bytes
Contents
RSpec.describe Spree::BaseHelper, type: :helper do include Spree::BaseHelper context 'volume pricing' do before do @variant = create :variant, price: 10 @variant.volume_prices.create! amount: 1, discount_type: 'dollar', range: '(10+)' end it 'gives discounted price' do expect(display_volume_price(@variant, 10)).to eq '$9.00' end it 'gives discount percent' do expect(display_volume_price_earning_percent(@variant, 10)).to eq '10' end it 'gives discount amount' do expect(display_volume_price_earning_amount(@variant, 10)).to eq '$1.00' end end end
Version data entries
4 entries across 4 versions & 1 rubygems