diff options
author | Jared Norman <jared@super.gd> | 2019-01-30 17:39:42 -0800 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2019-01-30 17:39:42 -0800 |
commit | ee7286c6d17641bbcc340e3e4b5e6f9e89737c6a (patch) | |
tree | ca9d1e01dde2eb7f6b75a585169a5c22ad269032 /spec | |
parent | 7293c1309c0534db6c8de031ef15a4a4601f1982 (diff) |
Add support for deleting order transactions
Diffstat (limited to 'spec')
-rw-r--r-- | spec/super_good/solidus_taxjar/api_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/super_good/solidus_taxjar/api_spec.rb b/spec/super_good/solidus_taxjar/api_spec.rb index 4c3a8e6..494496c 100644 --- a/spec/super_good/solidus_taxjar/api_spec.rb +++ b/spec/super_good/solidus_taxjar/api_spec.rb @@ -88,4 +88,21 @@ RSpec.describe SuperGood::SolidusTaxJar::API do it { is_expected.to eq({ some_kind_of: "response" }) } end + + describe "update_transaction_for" do + subject { api.delete_transaction_for order } + + let(:api) { described_class.new(taxjar_client: dummy_client) } + let(:dummy_client) { instance_double ::Taxjar::Client } + let(:order) { Spree::Order.new(number: "R111222333") } + + before do + allow(dummy_client) + .to receive(:delete_order) + .with("R111222333") + .and_return({ some_kind_of: "response" }) + end + + it { is_expected.to eq({ some_kind_of: "response" }) } + end end |