diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-05 15:23:28 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-07 18:05:52 -0300 |
commit | b98d59acdf6453708ec53e38146238cab9f9754c (patch) | |
tree | 741896b1285ea9f595de8642704a69a81a3c7b0f /spec | |
parent | f61bdfe39c6b0618144f369d5cf4df1099be9948 (diff) | |
download | gitlab-shell-b98d59acdf6453708ec53e38146238cab9f9754c.tar.gz |
Add gitaly notification on post-receive hook
Diffstat (limited to 'spec')
-rw-r--r-- | spec/gitlab_post_receive_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/gitlab_post_receive_spec.rb b/spec/gitlab_post_receive_spec.rb index 711545f..c63c267 100644 --- a/spec/gitlab_post_receive_spec.rb +++ b/spec/gitlab_post_receive_spec.rb @@ -19,6 +19,7 @@ describe GitlabPostReceive do GitlabConfig.any_instance.stub(repos_path: repository_path) GitlabNet.any_instance.stub(broadcast_message: { }) GitlabNet.any_instance.stub(:merge_request_urls).with(repo_path, wrongly_encoded_changes) { [] } + GitlabNet.any_instance.stub(notify_post_receive: true) expect(Time).to receive(:now).and_return(enqueued_at) end @@ -172,6 +173,15 @@ describe GitlabPostReceive do end end + context 'post_receive notification' do + it 'calls the api to notify the execution of the hook' do + expect_any_instance_of(GitlabNet).to receive(:notify_post_receive). + with(repo_path) + + gitlab_post_receive.exec + end + end + context "when the redis command succeeds" do before do |