diff options
author | Daniel Schaal <daniel@schaal.email> | 2017-06-08 05:15:16 +0200 |
---|---|---|
committer | Daniel Schaal <daniel@schaal.email> | 2017-06-10 11:19:07 +0200 |
commit | 1fbb81e4697fa3dc272ebfc89d0aa906def05892 (patch) | |
tree | ed445f9bd0e4dfad863166df6db6c78e19946560 /js/tests/unit/controller/ContentControllerSpec.js | |
parent | 7cebc63defdd640b822132a1e24b489345ac06e9 (diff) |
Fix tests
Diffstat (limited to 'js/tests/unit/controller/ContentControllerSpec.js')
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index dbee79f44..2e49e74db 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -361,18 +361,14 @@ describe('ContentController', function () { ItemResource.autoPage = jasmine.createSpy('autoPage') .and.callFake(function () { return { - success: function (callback) { + then: function (callback) { callback({ - 'items': [] + data: {'items': []} }); return { - error: function () { - return { - finally: function (callback) { - callback(); - } - }; + finally: function (callback) { + callback(); } }; } @@ -431,17 +427,15 @@ describe('ContentController', function () { ItemResource.autoPage = jasmine.createSpy('autoPage') .and.callFake(function () { return { - success: function (callback) { + then: function (callback) { callback({ - 'items': [{items: [{id: 3, fingerprint: 'a'}]}] + data: { + 'items': [ + {items: [{id: 3, fingerprint: 'a'}]}]} }); return { - error: function () { - return { - finally: function () { - } - }; + finally: function () { } }; } @@ -490,18 +484,13 @@ describe('ContentController', function () { ItemResource.autoPage = jasmine.createSpy('autoPage') .and.callFake(function () { return { - success: function (callback) { + then: function (callback, errorCallback) { callback({ - 'items': [] - }); + data: {'items': []} + }, errorCallback({})); return { - error: function (callback) { - callback(); - return { - finally: function () { - } - }; + finally: function () { } }; } |