summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-10-20 11:58:00 +0000
committerDouwe Maan <douwe@gitlab.com>2016-10-20 11:58:00 +0000
commitb1df8c4ec3f3213b7387e643bf57ce0fb1e1bcae (patch)
tree5d7b51c939e0eced5963a736d025f63ca316de01
parentded1e2f6576b974945aca610a2b6452120d9359a (diff)
parentd9d0b81bc6117f9c01c28c1fab597f556b56f369 (diff)
downloadgitlab-ce-b1df8c4ec3f3213b7387e643bf57ce0fb1e1bcae.tar.gz
Merge branch 'fix-label-api-spec' into 'master'
Make label API spec independent of order See merge request !7013
-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