diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-10-20 13:10:27 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-10-20 13:10:27 +0300 |
commit | d9d0b81bc6117f9c01c28c1fab597f556b56f369 (patch) | |
tree | 58bd1ca339b0d1fc71d21d30f552c3eb3c9d5e86 /spec/requests/api/labels_spec.rb | |
parent | 1f949c0a6b08563f3abcd9fd4c9e750c4097b44b (diff) |
Make label API spec independent of order
Diffstat (limited to 'spec/requests/api/labels_spec.rb')
-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 |