diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-08-14 17:55:34 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-08-14 17:55:34 +0300 |
commit | d7e95d77d845baf656d9be4e2cc077f7d426d7a8 (patch) | |
tree | 7b372305967fd925b04b8519d73cb0b01444e277 /spec | |
parent | d1b4770d6c4f287def26f1990654a00f0990ed65 (diff) |
Use with_repo_branch_commit instead of fetch_ref directly
So that we could limit the access to Repository#fetch_ref
See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13416#note_37487433
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 7b7d84f9bbf..0db645863fb 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -583,8 +583,7 @@ describe API::MergeRequests do before do fork_project.add_reporter(user2) - allow_any_instance_of(Repository).to receive(:fetch_ref) # for forks - allow_any_instance_of(Repository).to receive(:write_ref) # for non-forks + allow_any_instance_of(MergeRequest).to receive(:write_ref) end it "returns merge_request" do |