Adapt coordinator spec to ofn and remove spec that is not applicable (multi stock locations)

This commit is contained in:
Luis Ramos
2020-07-01 16:37:23 +01:00
parent 69b9cfbad2
commit 4711a7469a

View File

@@ -5,7 +5,7 @@ require 'spec_helper'
module Spree
module Stock
describe Coordinator do
let!(:order) { create(:order_with_line_items) }
let!(:order) { create(:order_with_line_items, distributor: create(:distributor_enterprise)) }
subject { Coordinator.new(order) }
@@ -17,20 +17,6 @@ module Spree
subject.packages
end
end
context "build packages" do
it "builds a package for every stock location" do
subject.packages.count == StockLocation.count
end
context "missing stock items in stock location" do
let!(:another_location) { create(:stock_location, propagate_all_variants: false) }
it "builds packages only for valid stock locations" do
subject.build_packages.count.should == (StockLocation.count - 1)
end
end
end
end
end
end