notifications_spec.rb 562 字节
Newer Older
1 2 3 4
require 'spec_helper'

describe Gitlab::GitalyClient::Notifications do
  describe '#post_receive' do
5
    let(:project) { create(:empty_project) }
6 7
    let(:storage_name) { project.repository_storage }
    let(:relative_path) { project.path_with_namespace + '.git' }
8
    subject { described_class.new(project.repository) }
9

10 11
    it 'sends a post_receive message' do
      expect_any_instance_of(Gitaly::Notifications::Stub).
12
        to receive(:post_receive).with(gitaly_request_with_path(storage_name, relative_path))
13

14
      subject.post_receive
15 16 17
    end
  end
end