summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/gitaly_client/notifications_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/gitaly_client/notifications_spec.rb')
-rw-r--r--spec/lib/gitlab/gitaly_client/notifications_spec.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/lib/gitlab/gitaly_client/notifications_spec.rb b/spec/lib/gitlab/gitaly_client/notifications_spec.rb
index bb5d93994ad..39c2048fef8 100644
--- a/spec/lib/gitlab/gitaly_client/notifications_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/notifications_spec.rb
@@ -2,12 +2,15 @@ require 'spec_helper'
describe Gitlab::GitalyClient::Notifications do
describe '#post_receive' do
+ let(:project) { create(:empty_project) }
+ let(:repo_path) { project.repository.path_to_repo }
+ subject { described_class.new(project.repository_storage, project.full_path + '.git') }
+
it 'sends a post_receive message' do
- repo_path = create(:empty_project).repository.path_to_repo
expect_any_instance_of(Gitaly::Notifications::Stub).
- to receive(:post_receive).with(post_receive_request_with_repo_path(repo_path))
+ to receive(:post_receive).with(gitaly_request_with_repo_path(repo_path))
- described_class.new(repo_path).post_receive
+ subject.post_receive
end
end
end