added products variable

This commit is contained in:
Yih Yang
2020-10-29 23:37:56 +08:00
parent f7ee08855a
commit b477ed4a0a

View File

@@ -16,6 +16,7 @@ describe ExchangeProductsRenderer do
end
it "loads products in order" do
products = renderer.exchange_products(true, exchange.sender)
sorted_products_names = products.map(&:name).sort
expect(products.map(&:name)).to eq(sorted_products_names)
@@ -34,6 +35,7 @@ describe ExchangeProductsRenderer do
end
it "loads products in order" do
products = renderer.exchange_products(false, exchange.receiver)
sorted_products_names = products.map(&:name).sort
expect(products.map(&:name)).to eq(sorted_products_names)