summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-08-22 06:23:38 -0700
committerStan Hu <stanhu@gmail.com>2018-08-22 06:23:49 -0700
commit0f2556680cf7f11837e1a4a3cd531e7859e9fc58 (patch)
tree6c16672294070aa57de3b5dd0353f67af076fec4 /spec/services
parentf3d9e19b02b57a15d9ba34b2bfd8756b3eb8b2bd (diff)
downloadgitlab-ce-0f2556680cf7f11837e1a4a3cd531e7859e9fc58.tar.gz
Improve system hook spec in spec/services/git_push_service_spec.rb
Diffstat (limited to 'spec/services')
-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