mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-24 05:38:52 +00:00
Make order cycle specs more robust
This commit is contained in:
@@ -9,7 +9,7 @@ r.element :order_cycle, @order_cycle do
|
||||
r.element :id
|
||||
end
|
||||
|
||||
r.list_of :exchanges do |exchange|
|
||||
r.list_of :exchanges, @order_cycle.exchanges.order('id ASC') do |exchange|
|
||||
r.element :id
|
||||
r.element :sender_id
|
||||
r.element :receiver_id
|
||||
|
||||
@@ -141,9 +141,9 @@ feature %q{
|
||||
page.should have_selector 'td.distributors', text: 'My distributor'
|
||||
|
||||
# And it should have some fees
|
||||
OrderCycle.last.exchanges.first.enterprise_fees.should == [supplier_fee]
|
||||
OrderCycle.last.coordinator_fees.should == [coordinator_fee]
|
||||
OrderCycle.last.exchanges.last.enterprise_fees.should == [distributor_fee]
|
||||
OrderCycle.last.exchanges.incoming.first.enterprise_fees.should == [supplier_fee]
|
||||
OrderCycle.last.coordinator_fees.should == [coordinator_fee]
|
||||
OrderCycle.last.exchanges.outgoing.first.enterprise_fees.should == [distributor_fee]
|
||||
|
||||
# And it should have some variants selected
|
||||
OrderCycle.last.exchanges.first.variants.count.should == 2
|
||||
|
||||
Reference in New Issue
Block a user