Merge branch 'fix-label-api-spec' into 'master'

Make label API spec independent of order

See merge request !7013
This commit is contained in:
Douwe Maan 2016-10-20 11:58:00 +00:00
commit b1df8c4ec3
1 changed files with 1 additions and 2 deletions

View File

@ -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