debian-mirror-gitlab/spec/workers/system_hook_push_worker_spec.rb

22 lines
571 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe SystemHookPushWorker do
2017-08-17 22:00:37 +05:30
include RepoHelpers
subject { described_class.new }
describe '#perform' do
it 'executes SystemHooksService with expected values' do
push_data = double('push_data')
system_hook_service = double('system_hook_service')
expect(SystemHooksService).to receive(:new).and_return(system_hook_service)
expect(system_hook_service).to receive(:execute_hooks).with(push_data, :push_hooks)
subject.perform(push_data, :push_hooks)
end
end
end