diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-15 21:08:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-15 21:08:34 +0300 |
commit | 571d993b49313dd806bd3f6af16d36c26d9d28ca (patch) | |
tree | 06bd12c4b56b97881aef8a00d4d46698de1eb63f /spec/models/diff_viewer | |
parent | 9044365a91112d426fbbfba07eca595652bbe2df (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/diff_viewer')
-rw-r--r-- | spec/models/diff_viewer/base_spec.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/models/diff_viewer/base_spec.rb b/spec/models/diff_viewer/base_spec.rb index 019597993cc..0a1c4c5560e 100644 --- a/spec/models/diff_viewer/base_spec.rb +++ b/spec/models/diff_viewer/base_spec.rb @@ -43,34 +43,6 @@ describe DiffViewer::Base do end end - context 'when the file type is supported' do - let(:commit) { project.commit('1a0b36b3cdad1d2ee32457c102a8c0b7056fa863') } - let(:diff_file) { commit.diffs.diff_file_with_new_path('LICENSE') } - - before do - viewer_class.file_types = %i(license) - viewer_class.binary = false - end - - context 'when the binaryness matches' do - it 'returns true' do - expect(viewer_class.can_render?(diff_file)).to be_truthy - end - end - - context 'when the binaryness does not match' do - before do - allow_next_instance_of(Blob) do |instance| - allow(instance).to receive(:binary_in_repo?).and_return(true) - end - end - - it 'returns false' do - expect(viewer_class.can_render?(diff_file)).to be_falsey - end - end - end - context 'when the extension and file type are not supported' do it 'returns false' do expect(viewer_class.can_render?(diff_file)).to be_falsey |