summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-03-30 16:20:05 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-03-30 16:20:05 +0200
commitee3d2332ec97487893ae5f1f46b599c550b25eb6 (patch)
treee5a46f12fc027e3deb7c9436160595bb60d99356 /js/tests
parent026ccbc8875fc78b665dec95c308afe8a3c5899e (diff)
fix #156
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/controller/ContentControllerSpec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js
index 5004c3ec2..dbb88bcbb 100644
--- a/js/tests/unit/controller/ContentControllerSpec.js
+++ b/js/tests/unit/controller/ContentControllerSpec.js
@@ -565,4 +565,16 @@ describe('ContentController', function () {
expect(ctrl.isShowAll()).toBe(true);
}));
+
+ it('should return the correct media type', inject(function ($controller) {
+
+ var ctrl = $controller('ContentController', {
+ data: {},
+ });
+
+ expect(ctrl.getMediaType('audio/test')).toBe('audio');
+ expect(ctrl.getMediaType('video/test')).toBe('video');
+ expect(ctrl.getMediaType('vides/test')).toBe(undefined);
+ }));
+
});