summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/requests/api/labels_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/requests/api/labels_spec.rb b/spec/requests/api/labels_spec.rb
index 1da9988978b..867bc615b97 100644
--- a/spec/requests/api/labels_spec.rb
+++ b/spec/requests/api/labels_spec.rb
@@ -22,8 +22,7 @@ describe API::API, api: true do
expect(response).to have_http_status(200)
expect(json_response).to be_an Array
expect(json_response.size).to eq(2)
- expect(json_response.first['name']).to eq(group_label.name)
- expect(json_response.second['name']).to eq(label1.name)
+ expect(json_response.map { |l| l['name'] }).to match_array([group_label.name, label1.name])
end
end