diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-30 21:48:30 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-30 21:48:30 -0500 |
commit | ce869e3964a40b4cf04a803f5201d940ad61b13c (patch) | |
tree | 826985092006a35e03d923c9b002db936d8c9894 /spec/helpers | |
parent | d9461314ada3135593a53ba61a73dd695ee3a38d (diff) | |
download | gitlab-ce-ce869e3964a40b4cf04a803f5201d940ad61b13c.tar.gz |
Fix Diff#too_large? and specs
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/blob_helper_spec.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index 366c635e8e8..bd3a3d24b84 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -168,21 +168,19 @@ describe BlobHelper do controller.params[:id] = File.join('master', blob.path) end - context 'for error :too_large' do - context 'when the size limit can be overridden' do - let(:blob) { fake_blob(size: 2.megabytes) } + context 'for error :collapsed' do + let(:blob) { fake_blob(size: 2.megabytes) } - it 'includes a "load it anyway" link' do - expect(helper.blob_render_error_options(viewer)).to include(/load it anyway/) - end + it 'includes a "load it anyway" link' do + expect(helper.blob_render_error_options(viewer)).to include(/load it anyway/) end + end - context 'when the size limit cannot be overridden' do - let(:blob) { fake_blob(size: 10.megabytes) } + context 'for error :too_large' do + let(:blob) { fake_blob(size: 10.megabytes) } - it 'does not include a "load it anyway" link' do - expect(helper.blob_render_error_options(viewer)).not_to include(/load it anyway/) - end + it 'does not include a "load it anyway" link' do + expect(helper.blob_render_error_options(viewer)).not_to include(/load it anyway/) end context 'when the viewer is rich' do |