mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Merge pull request #4520 from kristinalim/fix/4238-flaky_spec_in_api_taxons_index
4238 Do not assume order in spec for taxons list
This commit is contained in:
@@ -30,7 +30,8 @@ describe Api::TaxonsController do
|
||||
it "gets all taxons" do
|
||||
api_get :index
|
||||
|
||||
expect(json_response.first['name']).to eq taxonomy.root.name
|
||||
json_names = json_response.map { |taxon_data| taxon_data["name"] }
|
||||
expect(json_names).to include(taxon.name, taxon2.name)
|
||||
end
|
||||
|
||||
it "can search for a single taxon" do
|
||||
|
||||
Reference in New Issue
Block a user