Commit 6821f942 authored by Robert May's avatar Robert May

Add basic spec to cover the endpoint

parent 49666dba
...@@ -23,6 +23,19 @@ RSpec.describe API::MergeRequestApprovals do ...@@ -23,6 +23,19 @@ RSpec.describe API::MergeRequestApprovals do
end end
end end
describe "GET :id/merge_requests/:merge_request_iid/approval_settings" do
it "retrieves the approval settings" do
project.add_developer(approver)
project.add_developer(create(:user))
create(:approval, user: approver, merge_request: merge_request)
get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approval_settings", user)
expect(response).to have_gitlab_http_status(:ok)
end
end
describe 'POST :id/merge_requests/:merge_request_iid/approve' do describe 'POST :id/merge_requests/:merge_request_iid/approve' do
context 'as a valid approver' do context 'as a valid approver' do
let_it_be(:approver) { create(:user) } let_it_be(:approver) { create(:user) }
......
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