Commit e90f2c94 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix expectation to be update

parent ccf54188
...@@ -17,7 +17,7 @@ describe Admin::PushRulesController do ...@@ -17,7 +17,7 @@ describe Admin::PushRulesController do
end end
it 'updates sample push rule' do it 'updates sample push rule' do
expect_any_instance_of(PushRule).to receive(:update_attributes).with(ActionController::Parameters.new(params).permit!) expect_any_instance_of(PushRule).to receive(:update).with(ActionController::Parameters.new(params).permit!)
patch :update, push_rule: params patch :update, push_rule: params
......
...@@ -70,7 +70,7 @@ describe Projects::UpdateService, '#execute' do ...@@ -70,7 +70,7 @@ describe Projects::UpdateService, '#execute' do
let!(:old_name) { project.full_name } let!(:old_name) { project.full_name }
let(:operation) { update_project(project, user, name: 'foobar') } let(:operation) { update_project(project, user, name: 'foobar') }
let(:fail_condition!) do let(:fail_condition!) do
allow_any_instance_of(Project).to receive(:update_attributes).and_return(false) allow_any_instance_of(Project).to receive(:update).and_return(false)
end end
let(:attributes) do let(:attributes) do
...@@ -89,7 +89,7 @@ describe Projects::UpdateService, '#execute' do ...@@ -89,7 +89,7 @@ describe Projects::UpdateService, '#execute' do
include_examples 'audit event logging' do include_examples 'audit event logging' do
let(:operation) { update_project(project, user, path: 'foobar1') } let(:operation) { update_project(project, user, path: 'foobar1') }
let(:fail_condition!) do let(:fail_condition!) do
allow_any_instance_of(Project).to receive(:update_attributes).and_return(false) allow_any_instance_of(Project).to receive(:update).and_return(false)
end end
let(:attributes) do let(:attributes) do
...@@ -110,7 +110,7 @@ describe Projects::UpdateService, '#execute' do ...@@ -110,7 +110,7 @@ describe Projects::UpdateService, '#execute' do
update_project(project, user, visibility_level: Gitlab::VisibilityLevel::INTERNAL) update_project(project, user, visibility_level: Gitlab::VisibilityLevel::INTERNAL)
end end
let(:fail_condition!) do let(:fail_condition!) do
allow_any_instance_of(Project).to receive(:update_attributes).and_return(false) allow_any_instance_of(Project).to receive(:update).and_return(false)
end end
let(:attributes) do let(:attributes) do
......
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