Fix API::BranchesSpec.
- Previously created a protected branch manually, without using a factory.
This commit is contained in:
parent
dd3b738d5b
commit
0e2cecfd62
|
@ -243,7 +243,7 @@ describe API::API, api: true do
|
|||
end
|
||||
|
||||
it "removes protected branch" do
|
||||
project.protected_branches.create(name: branch_name)
|
||||
create(:protected_branch, project: project, name: branch_name)
|
||||
delete api("/projects/#{project.id}/repository/branches/#{branch_name}", user)
|
||||
expect(response).to have_http_status(405)
|
||||
expect(json_response['message']).to eq('Protected branch cant be removed')
|
||||
|
|
Loading…
Reference in New Issue