diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-22 18:07:20 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-08-22 18:07:20 +0000 |
commit | 0e9dc23d4622332c3f8874ba024cac9aa28277a3 (patch) | |
tree | b45f8ee120e742cde8900602ccc4948558e277ee | |
parent | f1315c85f91c76d308069a741db2a4a0d89d509e (diff) | |
parent | 0f2556680cf7f11837e1a4a3cd531e7859e9fc58 (diff) | |
download | gitlab-ce-0e9dc23d4622332c3f8874ba024cac9aa28277a3.tar.gz |
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
-rw-r--r-- | spec/services/git_push_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index ed0088a9500..3b1a302e217 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -224,11 +224,11 @@ describe GitPushService, services: true do end 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 - expect(SystemHooksService).to receive(:new).and_return(system_hook_service) - expect(system_hook_service).to receive(:execute_hooks).with(push_data, :push_hooks) + expect(SystemHooksService).to receive(:new).and_return(system_hooks_service) + expect(system_hooks_service).to receive(:execute_hooks).with(push_data, :push_hooks) execute_service(project, user, oldrev, newrev, ref) end |