diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-19 02:22:02 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-19 02:22:02 +0200 |
commit | 90584316b8f275fcad904b644676544eb0322636 (patch) | |
tree | 35ead28e8f0cdccc1771464442bb83ce5b558cc6 /js/tests/unit/controller | |
parent | ded252d29e99e068ea341506129e47a05e053a24 (diff) |
add test for firstrun page
Diffstat (limited to 'js/tests/unit/controller')
-rw-r--r-- | js/tests/unit/controller/AppControllerSpec.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/js/tests/unit/controller/AppControllerSpec.js b/js/tests/unit/controller/AppControllerSpec.js new file mode 100644 index 000000000..b7dad7492 --- /dev/null +++ b/js/tests/unit/controller/AppControllerSpec.js @@ -0,0 +1,45 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ +describe('AppController', function () { + 'use strict'; + + var controller; + + beforeEach(module('News')); + + beforeEach(inject(function ($controller) { + controller = $controller('AppController'); + })); + + + it('should expose Loading', inject(function (Loading) { + expect(controller.loading).toBe(Loading); + })); + + + it('should expose set firstrun if no feeds and folders', inject(function () { + expect(controller.isFirstRun()).toBe(true); + })); + + + it('should expose set firstrun if feeds', inject(function (Feed) { + Feed.add({url: 'test'}); + + expect(controller.isFirstRun()).toBe(false); + })); + + + it('should expose set firstrun if folders', inject(function (Folder) { + Folder.add({name: 'test'}); + + expect(controller.isFirstRun()).toBe(false); + })); + +});
\ No newline at end of file |