diff options
Diffstat (limited to 'spec/super_good/solidus_taxjar_spec.rb')
-rw-r--r-- | spec/super_good/solidus_taxjar_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/super_good/solidus_taxjar_spec.rb b/spec/super_good/solidus_taxjar_spec.rb index 7fe0dee..d9ef1d4 100644 --- a/spec/super_good/solidus_taxjar_spec.rb +++ b/spec/super_good/solidus_taxjar_spec.rb @@ -77,9 +77,14 @@ RSpec.describe SuperGood::SolidusTaxjar do describe ".shipping_calculator" do subject { described_class.shipping_calculator.call(order) } - let(:order) { instance_double(Spree::Order, shipment_total: 10) } + let(:order) { create :order } + let(:shipment) { create :shipment, order: order, cost: 20 } - it "returns the shipment total" do + before do + create :adjustment, order: order, adjustable: shipment, amount: -10, eligible: true, source: create(:shipping_rate, shipment: shipment) + end + + it "returns the shipment total including promotions" do expect(subject).to eq(10) end end |