summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Silvera <noah@super.gd>2021-04-09 13:35:27 -0700
committerNoah Silvera <noah@super.gd>2021-04-12 14:59:13 -0700
commita5f76766988f529de8cd9dc568237fbcde2fc311 (patch)
treed65f86a842c5c2f1ce57f0e22ffe394b8e58254d
parent19e9513bb8e3aca8c98128071d27d4ba59abc90b (diff)
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 <nick@super.gd>
-rw-r--r--spec/super_good/solidus_taxjar_spec.rb10
1 files changed, 10 insertions, 0 deletions
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