diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 12:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 12:09:48 +0300 |
commit | 03409cccee9b1cd8104484077338790add355c7d (patch) | |
tree | 82b4fbbb96d82f235dd1f76f155cd01a1a52d22a /spec/lib/gitlab/gitaly_client/blob_service_spec.rb | |
parent | 93f77228e32908b64ce7b9a3eb69e48efff11a9c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/gitaly_client/blob_service_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gitaly_client/blob_service_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/lib/gitlab/gitaly_client/blob_service_spec.rb b/spec/lib/gitlab/gitaly_client/blob_service_spec.rb index e35f541f5c8..f0ec58f3c2d 100644 --- a/spec/lib/gitlab/gitaly_client/blob_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/blob_service_spec.rb @@ -14,14 +14,14 @@ RSpec.describe Gitlab::GitalyClient::BlobService do let(:limit) { 5 } let(:not_in) { %w[branch-a branch-b] } let(:expected_params) do - { revision: revision, limit: limit, not_in_refs: not_in, not_in_all: false } + { revisions: ["master", "--not", "branch-a", "branch-b"], limit: limit } end subject { client.get_new_lfs_pointers(revision, limit, not_in) } it 'sends a get_new_lfs_pointers message' do expect_any_instance_of(Gitaly::BlobService::Stub) - .to receive(:get_new_lfs_pointers) + .to receive(:list_lfs_pointers) .with(gitaly_request_with_params(expected_params), kind_of(Hash)) .and_return([]) @@ -31,12 +31,12 @@ RSpec.describe Gitlab::GitalyClient::BlobService do context 'with not_in = :all' do let(:not_in) { :all } let(:expected_params) do - { revision: revision, limit: limit, not_in_refs: [], not_in_all: true } + { revisions: ["master", "--not", "--all"], limit: limit } end it 'sends the correct message' do expect_any_instance_of(Gitaly::BlobService::Stub) - .to receive(:get_new_lfs_pointers) + .to receive(:list_lfs_pointers) .with(gitaly_request_with_params(expected_params), kind_of(Hash)) .and_return([]) @@ -73,12 +73,16 @@ RSpec.describe Gitlab::GitalyClient::BlobService do end describe '#get_all_lfs_pointers' do + let(:expected_params) do + { revisions: ["--all"], limit: 0 } + end + subject { client.get_all_lfs_pointers } it 'sends a get_all_lfs_pointers message' do expect_any_instance_of(Gitaly::BlobService::Stub) - .to receive(:get_all_lfs_pointers) - .with(gitaly_request_with_params({}), kind_of(Hash)) + .to receive(:list_lfs_pointers) + .with(gitaly_request_with_params(expected_params), kind_of(Hash)) .and_return([]) subject |