From 967214b2eccc473eaeab45a22e496fefbcfe0841 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 22 Jun 2015 15:11:53 +0200 Subject: [PATCH] Merge requests API returns closed for closed and merged for merged. Signed-off-by: Dmitriy Zaporozhets --- CHANGELOG | 1 + spec/requests/api/merge_requests_spec.rb | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 34c7e60a3a1..b0ac7d69954 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ v 7.13.0 (unreleased) - Rename "Design" profile settings page to "Preferences". - 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 + - 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) - Fix post-receive errors on a push when an external issue tracker is configured (Stan Hu) diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 38c67bc9971..070a1228ecd 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -49,9 +49,8 @@ describe API::API, api: true do get api("/projects/#{project.id}/merge_requests?state=closed", user) expect(response.status).to eq(200) expect(json_response).to be_an Array - expect(json_response.length).to eq(2) - expect(json_response.second['title']).to eq(merge_request_closed.title) - expect(json_response.first['title']).to eq(merge_request_merged.title) + expect(json_response.length).to eq(1) + expect(json_response.first['title']).to eq(merge_request_closed.title) end it "should return an array of merged merge_requests" do