Skip to content

Commit

Permalink
Add additional coordinator tests
Browse files Browse the repository at this point in the history
Since the previous spec having stock locations with insufficient stock
failed (and is marked pending) I've added two more examples which do
pass.
  • Loading branch information
jhawthorn committed Jan 14, 2016
1 parent d3e5ced commit 2ad32e3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion core/spec/models/spree/stock/coordinator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,25 @@ module Stock
it_behaves_like "a fulfillable package"
end

context "with sufficient inventory across both locations" do
context "with sufficient inventory only across both locations" do
let(:location_1_inventory) { 2 }
let(:location_2_inventory) { 3 }
before { pending "This is broken. The coordinator packages this incorrectly" }
it_behaves_like "a fulfillable package"
end

context "has sufficient inventory in the second location and some in the first" do
let(:location_1_inventory) { 2 }
let(:location_2_inventory) { 5 }
it_behaves_like "a fulfillable package"
end

context "has sufficient inventory in the first location and some in the second" do
let(:location_1_inventory) { 5 }
let(:location_2_inventory) { 2 }
it_behaves_like "a fulfillable package"
end

context "with sufficient inventory in both locations" do
let(:location_1_inventory) { 5 }
let(:location_2_inventory) { 5 }
Expand Down

0 comments on commit 2ad32e3

Please sign in to comment.