mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Make test not depend on response's order
I'm assuming this is failing in CI due to the order in which the closed shops are returned.
This commit is contained in:
@@ -37,8 +37,9 @@ module Api
|
||||
spree_get :closed_shops, nil
|
||||
|
||||
expect(json_response).not_to match hub.name
|
||||
expect(json_response[0]['id']).to eq closed_hub1.id
|
||||
expect(json_response[1]['id']).to eq closed_hub2.id
|
||||
|
||||
response_ids = json_response.map { |shop| shop['id'] }
|
||||
expect(response_ids).to contain_exactly(closed_hub1.id, closed_hub2.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user