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/SettingsControllerSpec.js | |
parent | 7cebc63defdd640b822132a1e24b489345ac06e9 (diff) |
Fix tests
Diffstat (limited to 'js/tests/unit/controller/SettingsControllerSpec.js')
-rw-r--r-- | js/tests/unit/controller/SettingsControllerSpec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/unit/controller/SettingsControllerSpec.js b/js/tests/unit/controller/SettingsControllerSpec.js index 63b74abae..280d86db4 100644 --- a/js/tests/unit/controller/SettingsControllerSpec.js +++ b/js/tests/unit/controller/SettingsControllerSpec.js @@ -62,12 +62,12 @@ describe('SettingsController', function () { it('should import articles', inject(function ($controller, ItemResource, Publisher) { - var data = 1; + var response = {data: 1}; ItemResource.importArticles = jasmine.createSpy('importArticles') .and.callFake(function () { return { - success: function (callback) { - callback(data); + then: function (callback) { + callback(response.data); return { finally: function (finalCallback) { finalCallback(); @@ -89,7 +89,7 @@ describe('SettingsController', function () { expect(ItemResource.importArticles) .toHaveBeenCalledWith(JSON.parse(content)); - expect(Publisher.publishAll).toHaveBeenCalledWith(data); + expect(Publisher.publishAll).toHaveBeenCalledWith(response.data); expect(ctrl.isArticlesImporting).toBe(false); expect(ctrl.articleImportError).toBe(false); })); |