diff options
author | Daniel Schaal <daniel@schaal.email> | 2017-06-06 18:20:20 +0200 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2017-06-06 18:20:20 +0200 |
commit | b7f20c0f36dd6e0ed65ca93fcec44aa23f2fa203 (patch) | |
tree | 8882a0a91cce88683279b9030f126c303da5e7bb /js | |
parent | f18aef805e60d3c8c00f4aff0a5c633052e72e34 (diff) |
Fix travis build (#178)
* Use stable12 branch for travis
* Shorten db indices to max 27 characters to satisfy app:check-code
* Use precise container, downgrade to psql 9.4
* Create psql role
* Fix ContentController test
* Fix PageController and StatusService tests
* Use OCP\IDBConnection, OCP\IDb was removed
* Extend IntegrationTest from \Test\Testcase, use loginAsUser to login
* Require phpunit 5, nextcloud tests not compatible with phpunit 6
Change tests to use phpunit from vendor directory
Diffstat (limited to 'js')
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index c978238de..dbee79f44 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -402,13 +402,15 @@ describe('ContentController', function () { })); - it ('should toggle active item', function ($controller) { - var ctrl = $controller('ContentController'); - expect(ctrl.isItemActive(3)).toBe(undefined); + it ('should toggle active item', inject(function ($controller) { + var ctrl = $controller('ContentController', { + data: {'items': [{id: 3}, {id: 4}]} + }); + expect(ctrl.isItemActive(3)).toBe(false); ctrl.setItemActive(3); expect(ctrl.isItemActive(4)).toBe(false); expect(ctrl.isItemActive(3)).toBe(true); - }); + })); it('should autopage if more than 0 elements', inject(function ($controller, ItemResource, Publisher) { |