Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 18:06:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 18:06:17 +0300
commit00c78fb814d7ce00989ac04edd6cdaa3239da284 (patch)
treef04920f08eb4e481ce27bd1d96862676dff735dc /spec/models/blob_spec.rb
parentd2ffc30fd583e86d4122bb5061098f4f3ca7b3f1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/blob_spec.rb')
-rw-r--r--spec/models/blob_spec.rb16
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