Commit 967214b2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge requests API returns closed for closed and merged for merged.

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent eb972b71
...@@ -7,6 +7,7 @@ v 7.13.0 (unreleased) ...@@ -7,6 +7,7 @@ v 7.13.0 (unreleased)
- Rename "Design" profile settings page to "Preferences". - Rename "Design" profile settings page to "Preferences".
- Allow users to customize their default Dashboard page. - Allow users to customize their default Dashboard page.
- Update ssl_ciphers in Nginx example to remove DHE settings. This will deny forward secrecy for Android 2.3.7, Java 6 and OpenSSL 0.9.8 - Update ssl_ciphers in Nginx example to remove DHE settings. This will deny forward secrecy for Android 2.3.7, Java 6 and OpenSSL 0.9.8
- API request /projects/:project_id/merge_requests?state=closed will return only closed merge requests without merged one. If you need ones that were merged - use state=merged.
v 7.12.0 (unreleased) v 7.12.0 (unreleased)
- Fix post-receive errors on a push when an external issue tracker is configured (Stan Hu) - Fix post-receive errors on a push when an external issue tracker is configured (Stan Hu)
......
...@@ -49,9 +49,8 @@ describe API::API, api: true do ...@@ -49,9 +49,8 @@ describe API::API, api: true do
get api("/projects/#{project.id}/merge_requests?state=closed", user) get api("/projects/#{project.id}/merge_requests?state=closed", user)
expect(response.status).to eq(200) expect(response.status).to eq(200)
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response.length).to eq(2) expect(json_response.length).to eq(1)
expect(json_response.second['title']).to eq(merge_request_closed.title) expect(json_response.first['title']).to eq(merge_request_closed.title)
expect(json_response.first['title']).to eq(merge_request_merged.title)
end end
it "should return an array of merged merge_requests" do it "should return an array of merged merge_requests" 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