Commit 0f255668 authored by Stan Hu's avatar Stan Hu

Improve system hook spec in spec/services/git_push_service_spec.rb

parent f3d9e19b
...@@ -224,11 +224,11 @@ describe GitPushService, services: true do ...@@ -224,11 +224,11 @@ describe GitPushService, services: true do
end end
describe 'system hooks' do describe 'system hooks' do
let(:system_hook_service) { double() } let(:system_hooks_service) { SystemHooksService.new }
it "sends a system hook after pushing a branch" do it "sends a system hook after pushing a branch" do
expect(SystemHooksService).to receive(:new).and_return(system_hook_service) expect(SystemHooksService).to receive(:new).and_return(system_hooks_service)
expect(system_hook_service).to receive(:execute_hooks).with(push_data, :push_hooks) expect(system_hooks_service).to receive(:execute_hooks).with(push_data, :push_hooks)
execute_service(project, user, oldrev, newrev, ref) execute_service(project, user, oldrev, newrev, ref)
end end
......
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