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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/checks/lfs_check_spec.rb')
-rw-r--r--spec/lib/gitlab/checks/lfs_check_spec.rb10
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