summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-08-22 18:07:20 +0000
committerStan Hu <stanhu@gmail.com>2018-08-22 18:07:20 +0000
commit0e9dc23d4622332c3f8874ba024cac9aa28277a3 (patch)
treeb45f8ee120e742cde8900602ccc4948558e277ee
parentf1315c85f91c76d308069a741db2a4a0d89d509e (diff)
parent0f2556680cf7f11837e1a4a3cd531e7859e9fc58 (diff)
downloadgitlab-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.rb6
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