diff options
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); + })); + }); |