Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Remove duplication in add_item_spec

Piotr Milewski1633943038f7
diff --git a/core/spec/services/spree/cart/add_item_spec.rb b/core/spec/services/spree/cart/add_item_spec.rb
index 12e9d8a8ef..0636c5d3e0 100644
--- a/core/spec/services/spree/cart/add_item_spec.rb
+++ b/core/spec/services/spree/cart/add_item_spec.rb
@@ -185,19 +185,6 @@ module Spree
end
end
- context 'pass non-existing variant' do
- let(:variant_2) { create :variant }
- let(:execute) { subject.call(order: order, variant: variant_2, quantity: 1) }
-
- before { Spree::Variant.find(variant_2.id).destroy }
-
- it do
- expect(execute).to be_failure
- order.reload
- expect(order.line_items.count).to eq 0
- end
- end
-
context 'variant have not desired quantity' do
let(:execute) { subject.call(order: order, variant: variant, quantity: 10) }