diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-02 10:22:56 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-02 10:22:56 +0100 |
commit | ddfd09c09cb904529df567e5606d76c467ed856f (patch) | |
tree | d17a48cf08e580cac866417700ea1ffe74c48bd7 /spec/lib/gitlab/gitaly_client/notifications_spec.rb | |
parent | 52c4a7866ed010d8db67e5ca976d8c73d4084784 (diff) | |
parent | 3b3f0fab452fb9cbe4fbe7f75112bef3a7f9d039 (diff) | |
download | gitlab-ce-ddfd09c09cb904529df567e5606d76c467ed856f.tar.gz |
Merge branch 'master' into zj-create-mattermost-team
Diffstat (limited to 'spec/lib/gitlab/gitaly_client/notifications_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gitaly_client/notifications_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/notifications_spec.rb b/spec/lib/gitlab/gitaly_client/notifications_spec.rb new file mode 100644 index 00000000000..a6252c99aa1 --- /dev/null +++ b/spec/lib/gitlab/gitaly_client/notifications_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe Gitlab::GitalyClient::Notifications do + let(:client) { Gitlab::GitalyClient::Notifications.new } + + before do + allow(Gitlab.config.gitaly).to receive(:socket_path).and_return('path/to/gitaly.socket') + end + + describe '#post_receive' do + let(:repo_path) { '/path/to/my_repo.git' } + + it 'sends a post_receive message' do + expect_any_instance_of(Gitaly::Notifications::Stub). + to receive(:post_receive).with(post_receive_request_with_repo_path(repo_path)) + + client.post_receive(repo_path) + end + end +end |