debian-mirror-gitlab/spec/lib/gitlab/gitaly_client/cleanup_service_spec.rb

27 lines
780 B
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
2019-02-15 15:39:39 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::GitalyClient::CleanupService do
2019-02-15 15:39:39 +05:30
let(:project) { create(:project) }
let(:storage_name) { project.repository_storage }
let(:relative_path) { project.disk_path + '.git' }
let(:client) { described_class.new(project.repository) }
2019-07-31 22:56:46 +05:30
describe '#apply_bfg_object_map_stream' do
2020-01-01 13:55:28 +05:30
before do
::Gitlab::GitalyClient.clear_stubs!
end
2019-07-31 22:56:46 +05:30
it 'sends an apply_bfg_object_map_stream message' do
2020-01-01 13:55:28 +05:30
expect_next_instance_of(Gitaly::CleanupService::Stub) do |instance|
expect(instance).to receive(:apply_bfg_object_map_stream)
.with(kind_of(Enumerator), kind_of(Hash))
.and_return([])
end
2019-02-15 15:39:39 +05:30
2019-07-31 22:56:46 +05:30
client.apply_bfg_object_map_stream(StringIO.new)
2019-02-15 15:39:39 +05:30
end
end
end