Commit b7e6e4e4 authored by Chantal Rollison's avatar Chantal Rollison

Fixed flaky spec for merge request lists

parent ed4675c6
...@@ -136,8 +136,9 @@ shared_examples 'merge requests list' do ...@@ -136,8 +136,9 @@ shared_examples 'merge requests list' do
it 'returns an array of merge requests in given milestone' do it 'returns an array of merge requests in given milestone' do
get api(endpoint_path, user), milestone: '0.9' get api(endpoint_path, user), milestone: '0.9'
expect(json_response.first['title']).to eq merge_request_closed.title closed_issues = json_response.select { |mr| mr['id'] == merge_request_closed.id }
expect(json_response.first['id']).to eq merge_request_closed.id expect(closed_issues.length).to eq(1)
expect(closed_issues.first['title']).to eq merge_request_closed.title
end end
it 'returns an array of merge requests matching state in milestone' do it 'returns an array of merge requests matching state in milestone' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment