diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 15:06:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 15:06:17 +0000 |
commit | 00c78fb814d7ce00989ac04edd6cdaa3239da284 (patch) | |
tree | f04920f08eb4e481ce27bd1d96862676dff735dc /spec/models/blob_spec.rb | |
parent | d2ffc30fd583e86d4122bb5061098f4f3ca7b3f1 (diff) | |
download | gitlab-ce-00c78fb814d7ce00989ac04edd6cdaa3239da284.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/blob_spec.rb')
-rw-r--r-- | spec/models/blob_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/blob_spec.rb b/spec/models/blob_spec.rb index 2efab3076d8..9e55fbcce20 100644 --- a/spec/models/blob_spec.rb +++ b/spec/models/blob_spec.rb @@ -320,6 +320,22 @@ describe Blob do expect(blob.rich_viewer).to be_a(BlobViewer::Markup) end end + + context 'when the blob is video' do + it 'returns a video viewer' do + blob = fake_blob(path: 'file.mp4', binary: true) + + expect(blob.rich_viewer).to be_a(BlobViewer::Video) + end + end + + context 'when the blob is audio' do + it 'returns an audio viewer' do + blob = fake_blob(path: 'file.wav', binary: true) + + expect(blob.rich_viewer).to be_a(BlobViewer::Audio) + end + end end describe '#auxiliary_viewer' do |