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:
Pau Pérez Fabregat
2019-11-29 13:23:51 +01:00
committed by GitHub

View File

@@ -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