diff options
author | Valery Sizov <valery@gitlab.com> | 2016-07-04 15:30:22 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-07-04 15:31:49 +0300 |
commit | bf218337ed5bd535856204ef1878a1495fa37dfe (patch) | |
tree | 66415495c994a17fb0c45bcfcb4a3d08d808098f /spec/services/git_hooks_service_spec.rb | |
parent | 021b6aef94b3398ab5603b4c11afd4c6d8432795 (diff) |
Better message for git hooks and file locks
Diffstat (limited to 'spec/services/git_hooks_service_spec.rb')
-rw-r--r-- | spec/services/git_hooks_service_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/git_hooks_service_spec.rb b/spec/services/git_hooks_service_spec.rb index 6367ac832e8..3fc37a315c0 100644 --- a/spec/services/git_hooks_service_spec.rb +++ b/spec/services/git_hooks_service_spec.rb @@ -18,16 +18,16 @@ describe GitHooksService, services: true do describe '#execute' do context 'when receive hooks were successful' do it 'should call post-receive hook' do - hook = double(trigger: true) + hook = double(trigger: [true, nil]) expect(Gitlab::Git::Hook).to receive(:new).exactly(3).times.and_return(hook) - expect(service.execute(user, @repo_path, @blankrev, @newrev, @ref) { }).to eq(true) + expect(service.execute(user, @repo_path, @blankrev, @newrev, @ref) { }).to eq([true, nil]) end end context 'when pre-receive hook failed' do it 'should not call post-receive hook' do - expect(service).to receive(:run_hook).with('pre-receive').and_return(false) + expect(service).to receive(:run_hook).with('pre-receive').and_return([false, '']) expect(service).not_to receive(:run_hook).with('post-receive') expect do @@ -38,8 +38,8 @@ describe GitHooksService, services: true do context 'when update hook failed' do it 'should not call post-receive hook' do - expect(service).to receive(:run_hook).with('pre-receive').and_return(true) - expect(service).to receive(:run_hook).with('update').and_return(false) + expect(service).to receive(:run_hook).with('pre-receive').and_return([true, nil]) + expect(service).to receive(:run_hook).with('update').and_return([false, '']) expect(service).not_to receive(:run_hook).with('post-receive') expect do |