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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-05 06:08:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-05 06:08:54 +0300
commit4b4d338d32fa30c7dcbf0ed54e99c00a56d66ff3 (patch)
tree437a140bd52f1b426fa930f4256a6956e00b4b67 /spec/lib/gitlab/checks
parent7ff2de7c12d71873a3c0e85cc6fbcd5d5f05b5c1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/checks')
-rw-r--r--spec/lib/gitlab/checks/lfs_check_spec.rb23
1 files changed, 18 insertions, 5 deletions
diff --git a/spec/lib/gitlab/checks/lfs_check_spec.rb b/spec/lib/gitlab/checks/lfs_check_spec.rb
index 713858e0e35..19c1d820dff 100644
--- a/spec/lib/gitlab/checks/lfs_check_spec.rb
+++ b/spec/lib/gitlab/checks/lfs_check_spec.rb
@@ -39,13 +39,26 @@ RSpec.describe Gitlab::Checks::LfsCheck do
end
end
- context 'deletion' do
- let(:changes) { { oldrev: oldrev, ref: ref } }
+ context 'with deletion' do
+ shared_examples 'a skipped integrity check' do
+ it 'skips integrity check' do
+ expect(project.repository).not_to receive(:new_objects)
+ expect_any_instance_of(Gitlab::Git::LfsChanges).not_to receive(:new_pointers)
+
+ subject.validate!
+ end
+ end
- it 'skips integrity check' do
- expect(project.repository).not_to receive(:new_objects)
+ context 'with missing newrev' do
+ it_behaves_like 'a skipped integrity check' do
+ let(:changes) { { oldrev: oldrev, ref: ref } }
+ end
+ end
- subject.validate!
+ context 'with blank newrev' do
+ it_behaves_like 'a skipped integrity check' do
+ let(:changes) { { oldrev: oldrev, newrev: Gitlab::Git::BLANK_SHA, ref: ref } }
+ end
end
end