diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-21 14:21:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-21 14:21:10 +0000 |
commit | cb0d23c455b73486fd1015f8ca9479b5b7e3585d (patch) | |
tree | d7dc129a407fd74266d2dc561bebf24665197c2f /spec/models/diff_viewer/base_spec.rb | |
parent | c3e911be175c0aabfea1eb030f9e0ef23f5f3887 (diff) | |
download | gitlab-ce-cb0d23c455b73486fd1015f8ca9479b5b7e3585d.tar.gz |
Add latest changes from gitlab-org/gitlab@12-7-stable-ee
Diffstat (limited to 'spec/models/diff_viewer/base_spec.rb')
-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 |