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

Merge branch 'sh-improve-system-hook-spec' into 'master'

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

See merge request gitlab-org/gitlab-ce!21347
parents f1315c85 0f255668
...@@ -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