diff options
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-rw-r--r-- | spec/requests/api/branches_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index f40d68b75a4..cb6e5e89625 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -141,7 +141,9 @@ describe API::API, api: true do end describe "DELETE /projects/:id/repository/branches/:branch" do - before { Repository.any_instance.stub(rm_branch: true) } + before do + allow_any_instance_of(Repository).to receive(:rm_branch).and_return(true) + end it "should remove branch" do delete api("/projects/#{project.id}/repository/branches/#{branch_name}", user) |