diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-30 16:20:05 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-30 16:20:05 +0200 |
commit | ee3d2332ec97487893ae5f1f46b599c550b25eb6 (patch) | |
tree | e5a46f12fc027e3deb7c9436160595bb60d99356 /js/tests/unit | |
parent | 026ccbc8875fc78b665dec95c308afe8a3c5899e (diff) |
fix #156
Diffstat (limited to 'js/tests/unit')
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 12 |
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); + })); + }); |