Welcome to mirror list, hosted at ThFree Co, Russian Federation.

notification_service_spec.rb « gitaly_client « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1bcdd5e54976510aeaf81366fade5e0871cc6eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'spec_helper'

describe Gitlab::GitalyClient::NotificationService do
  describe '#post_receive' do
    let(:project) { create(:empty_project) }
    let(:storage_name) { project.repository_storage }
    let(:relative_path) { project.disk_path + '.git' }
    subject { described_class.new(project.repository) }

    it 'sends a post_receive message' do
      expect_any_instance_of(Gitaly::NotificationService::Stub)
        .to receive(:post_receive).with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash))

      subject.post_receive
    end
  end
end