diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/gitlab/checks/lfs_check_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/checks/lfs_check_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/lfs_check_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/lib/gitlab/checks/lfs_check_spec.rb b/spec/lib/gitlab/checks/lfs_check_spec.rb index 19c1d820dff..331a43b814f 100644 --- a/spec/lib/gitlab/checks/lfs_check_spec.rb +++ b/spec/lib/gitlab/checks/lfs_check_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Gitlab::Checks::LfsCheck do - include_context 'change access checks context' + include_context 'changes access checks context' let(:blob_object) { project.repository.blob_at_branch('lfs', 'files/lfs/lfs_object.iso') } @@ -15,6 +15,10 @@ RSpec.describe Gitlab::Checks::LfsCheck do describe '#validate!' do context 'with LFS not enabled' do + before do + allow(project).to receive(:lfs_enabled?).and_return(false) + end + it 'skips integrity check' do expect_any_instance_of(Gitlab::Git::LfsChanges).not_to receive(:new_pointers) @@ -51,13 +55,13 @@ RSpec.describe Gitlab::Checks::LfsCheck do context 'with missing newrev' do it_behaves_like 'a skipped integrity check' do - let(:changes) { { oldrev: oldrev, ref: ref } } + let(:changes) { [{ oldrev: oldrev, ref: ref }] } end end context 'with blank newrev' do it_behaves_like 'a skipped integrity check' do - let(:changes) { { oldrev: oldrev, newrev: Gitlab::Git::BLANK_SHA, ref: ref } } + let(:changes) { [{ oldrev: oldrev, newrev: Gitlab::Git::BLANK_SHA, ref: ref }] } end end end |