From a5f76766988f529de8cd9dc568237fbcde2fc311 Mon Sep 17 00:00:00 2001 From: Noah Silvera Date: Fri, 9 Apr 2021 13:35:27 -0700 Subject: Add a simple spec for the shipping calculator We are going to be changing the shipping calculator, so we should add a simple spec to test the existing behavior. Co-authored-by: Nick Van Doorn --- spec/super_good/solidus_taxjar_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/super_good/solidus_taxjar_spec.rb b/spec/super_good/solidus_taxjar_spec.rb index 6236b2f..7fe0dee 100644 --- a/spec/super_good/solidus_taxjar_spec.rb +++ b/spec/super_good/solidus_taxjar_spec.rb @@ -73,5 +73,15 @@ RSpec.describe SuperGood::SolidusTaxjar do let(:spree_line_item) { Spree::LineItem.new } it { is_expected.to eq "Sales Tax" } end + + describe ".shipping_calculator" do + subject { described_class.shipping_calculator.call(order) } + + let(:order) { instance_double(Spree::Order, shipment_total: 10) } + + it "returns the shipment total" do + expect(subject).to eq(10) + end + end end end -- cgit v1.2.3