summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/gitaly_client/notifications_spec.rb
blob: 39c2048fef843f9bc91ecd155f0724b6b599bcbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
      expect_any_instance_of(Gitaly::Notifications::Stub).
        to receive(:post_receive).with(gitaly_request_with_repo_path(repo_path))

      subject.post_receive
    end
  end
end