Created
October 29, 2018 12:25
-
-
Save cored/ddc93a9aa5d5c3a733112a22a1e5021b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "when there are shipments that have bundleable products" do | |
let(:shipments_in) { [shipment1, shipment2] } | |
let(:shipment1) { build(:shipment, products: [product_a]) } | |
let(:shipment2) { build(:shipment, products: [product_b]) } | |
it "returns the bundling product instead of the bundleable ones" do | |
expect(shipments_out.first.products).to match_array(product_c) | |
end | |
it "does not return the unused shipment" do | |
expect(shipments_out.count).to eq 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment