Do not assume order in test for taxons list

This commit is contained in:
Kristina Lim
2019-11-28 20:31:52 +08:00
parent dfa3d40665
commit c6fb7dafec

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