diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-27 02:27:30 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-30 01:02:02 +0300 |
commit | aed0387f97ec62b184da90bdca0ce40f9dc58b45 (patch) | |
tree | 54223237527ddbcaa93bfea552f2fda2b6c1c61f /spec/helpers | |
parent | 1ac12698c613774bdace72475573916c142a07e4 (diff) |
Consistent diff and blob size limit names
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/blob_helper_spec.rb | 12 | ||||
-rw-r--r-- | spec/helpers/diff_helper_spec.rb | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index 41b5df12522..366c635e8e8 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -118,8 +118,8 @@ describe BlobHelper do Class.new(BlobViewer::Base) do include BlobViewer::ServerSide - self.overridable_max_size = 1.megabyte - self.max_size = 5.megabytes + self.collapse_limit = 1.megabyte + self.size_limit = 5.megabytes self.type = :rich end end @@ -129,7 +129,7 @@ describe BlobHelper do describe '#blob_render_error_reason' do context 'for error :too_large' do - context 'when the blob size is larger than the absolute max size' do + context 'when the blob size is larger than the absolute size limit' do let(:blob) { fake_blob(size: 10.megabytes) } it 'returns an error message' do @@ -137,7 +137,7 @@ describe BlobHelper do end end - context 'when the blob size is larger than the max size' do + context 'when the blob size is larger than the size limit' do let(:blob) { fake_blob(size: 2.megabytes) } it 'returns an error message' do @@ -169,7 +169,7 @@ describe BlobHelper do end context 'for error :too_large' do - context 'when the max size can be overridden' do + context 'when the size limit can be overridden' do let(:blob) { fake_blob(size: 2.megabytes) } it 'includes a "load it anyway" link' do @@ -177,7 +177,7 @@ describe BlobHelper do end end - context 'when the max size cannot be overridden' do + context 'when the size limit cannot be overridden' do let(:blob) { fake_blob(size: 10.megabytes) } it 'does not include a "load it anyway" link' do diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb index dd6566d25bb..84341a51f2d 100644 --- a/spec/helpers/diff_helper_spec.rb +++ b/spec/helpers/diff_helper_spec.rb @@ -33,17 +33,17 @@ describe DiffHelper do describe 'diff_options' do it 'returns no collapse false' do - expect(diff_options).to include(no_collapse: false) + expect(diff_options).to include(expanded: false) end - it 'returns no collapse true if expand_all_diffs' do - allow(controller).to receive(:params) { { expand_all_diffs: true } } - expect(diff_options).to include(no_collapse: true) + it 'returns no collapse true if expanded' do + allow(controller).to receive(:params) { { expanded: true } } + expect(diff_options).to include(expanded: true) end it 'returns no collapse true if action name diff_for_path' do allow(controller).to receive(:action_name) { 'diff_for_path' } - expect(diff_options).to include(no_collapse: true) + expect(diff_options).to include(expanded: true) end it 'returns paths if action name diff_for_path and param old path' do |