summaryrefslogtreecommitdiff
path: root/lib/api/merge_requests.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-13 11:01:40 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-13 11:01:40 +0300
commitab032256da9f24351871143058343f7463f9d7fc (patch)
tree82b52ee627f6be2c7b6ae4e8311a33cc1d8ca2b7 /lib/api/merge_requests.rb
parent5880d7df6253fc97024005e7c32dbc41def99aaf (diff)
downloadgitlab-ce-ab032256da9f24351871143058343f7463f9d7fc.tar.gz
Add some tests for merge API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/merge_requests.rb')
-rw-r--r--lib/api/merge_requests.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 3dffe7bd4df..7fb135b37b8 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -34,7 +34,7 @@ module API
when "closed" then user_project.merge_requests.closed
when "merged" then user_project.merge_requests.merged
else user_project.merge_requests
- end
+ end
present paginate(mrs), with: Entities::MergeRequest
end
@@ -129,7 +129,7 @@ module API
:push_code
end
- if can?(current_user, action, project)
+ if can?(current_user, action, user_project)
if merge_request.unchecked?
merge_request.check_if_can_be_merged
end