mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Convert specs to RSpec 3.7.0 syntax with Transpec
This conversion is done by Transpec 3.3.0 with the following command:
transpec spec/lib/open_food_network/order_and_distributor_report_spec.rb
* 2 conversions
from: == expected
to: eq(expected)
* 2 conversions
from: obj.should
to: expect(obj).to
For more details: https://github.com/yujinakayama/transpec#supported-conversions
This commit is contained in:
@@ -26,11 +26,11 @@ module OpenFoodNetwork
|
||||
subject = OrderAndDistributorReport.new nil
|
||||
|
||||
header = subject.header
|
||||
header.should == ["Order date", "Order Id",
|
||||
expect(header).to eq(["Order date", "Order Id",
|
||||
"Customer Name","Customer Email", "Customer Phone", "Customer City",
|
||||
"SKU", "Item name", "Variant", "Quantity", "Max Quantity", "Cost", "Shipping Cost",
|
||||
"Payment Method",
|
||||
"Distributor", "Distributor address", "Distributor city", "Distributor postcode", "Shipping instructions"]
|
||||
"Distributor", "Distributor address", "Distributor city", "Distributor postcode", "Shipping instructions"])
|
||||
end
|
||||
|
||||
it "should denormalise order and distributor details for display as csv" do
|
||||
@@ -38,11 +38,11 @@ module OpenFoodNetwork
|
||||
|
||||
table = subject.send(:line_item_details, [@order])
|
||||
|
||||
table[0].should == [@order.created_at, @order.id,
|
||||
expect(table[0]).to eq([@order.created_at, @order.id,
|
||||
@bill_address.full_name, @order.email, @bill_address.phone, @bill_address.city,
|
||||
@line_item.product.sku, @line_item.product.name, @line_item.options_text, @line_item.quantity, @line_item.max_quantity, @line_item.price * @line_item.quantity, @line_item.distribution_fee,
|
||||
@payment_method.name,
|
||||
@distributor.name, @distributor.address.address1, @distributor.address.city, @distributor.address.zipcode, @shipping_instructions ]
|
||||
@distributor.name, @distributor.address.address1, @distributor.address.city, @distributor.address.zipcode, @shipping_instructions ])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user