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>2020-10-21 10:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /spec/models/snippet_spec.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/models/snippet_spec.rb')
-rw-r--r--spec/models/snippet_spec.rb17
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb
index ab614a6d45c..d74f5faab7f 100644
--- a/spec/models/snippet_spec.rb
+++ b/spec/models/snippet_spec.rb
@@ -666,16 +666,13 @@ RSpec.describe Snippet do
let(:checker) { subject.repository_size_checker }
let(:current_size) { 60 }
+ let(:namespace) { nil }
before do
allow(subject.repository).to receive(:size).and_return(current_size)
end
- it 'sets up size checker', :aggregate_failures do
- expect(checker.current_size).to eq(current_size.megabytes)
- expect(checker.limit).to eq(Gitlab::CurrentSettings.snippet_size_limit)
- expect(checker.enabled?).to be_truthy
- end
+ include_examples 'size checker for snippet'
end
describe '#can_cache_field?' do
@@ -717,19 +714,11 @@ RSpec.describe Snippet do
end
describe '.max_file_limit' do
- subject { described_class.max_file_limit(nil) }
+ subject { described_class.max_file_limit }
it "returns #{Snippet::MAX_FILE_COUNT}" do
expect(subject).to eq Snippet::MAX_FILE_COUNT
end
-
- context 'when feature flag :snippet_multiple_files is disabled' do
- it "returns #{described_class::MAX_SINGLE_FILE_COUNT}" do
- stub_feature_flags(snippet_multiple_files: false)
-
- expect(subject).to eq described_class::MAX_SINGLE_FILE_COUNT
- end
- end
end
describe '#list_files' do