diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-10-20 12:10:27 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-10-20 12:10:27 +0200 |
commit | d9d0b81bc6117f9c01c28c1fab597f556b56f369 (patch) | |
tree | 58bd1ca339b0d1fc71d21d30f552c3eb3c9d5e86 | |
parent | 1f949c0a6b08563f3abcd9fd4c9e750c4097b44b (diff) | |
download | gitlab-ce-d9d0b81bc6117f9c01c28c1fab597f556b56f369.tar.gz |
Make label API spec independent of order
-rw-r--r-- | spec/requests/api/labels_spec.rb | 3 |
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 |