diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/lib/gitlab/highlight_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/highlight_spec.rb')
-rw-r--r-- | spec/lib/gitlab/highlight_spec.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/spec/lib/gitlab/highlight_spec.rb b/spec/lib/gitlab/highlight_spec.rb index ccb3ae1018a..1f06019c929 100644 --- a/spec/lib/gitlab/highlight_spec.rb +++ b/spec/lib/gitlab/highlight_spec.rb @@ -50,16 +50,9 @@ RSpec.describe Gitlab::Highlight do let(:result) { described_class.highlight(file_name, content) } # content is 44 bytes before do - stub_feature_flags(one_megabyte_file_size_limit: false) stub_config(extra: { 'maximum_text_highlight_size_kilobytes' => 0.0001 } ) # 1.024 bytes end - it 'confirm file size is 1MB when `one_megabyte_file_size_limit` is enabled' do - stub_feature_flags(one_megabyte_file_size_limit: true) - expect(described_class.too_large?(1024.kilobytes)).to eq(false) - expect(described_class.too_large?(1025.kilobytes)).to eq(true) - end - it 'increments the metric for oversized files' do expect { result }.to change { over_highlight_size_limit('file size: 0.0001') }.by(1) end |