diff options
Diffstat (limited to 'js/tests/unit/controller')
-rw-r--r-- | js/tests/unit/controller/ContentControllerSpec.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index e413df672..5004c3ec2 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -322,6 +322,12 @@ describe('ContentController', function () { SettingsResource.set('oldestFirst', true); SettingsResource.set('showAll', false); + var $location = { + search: jasmine.createSpy('search').and.returnValue({ + search: 'some+string' + }) + }; + var $route = { current: { $$route: { @@ -363,6 +369,7 @@ describe('ContentController', function () { ItemResource: ItemResource, SettingsResource: SettingsResource, data: {'items': [{id: 3}, {id: 4}]}, + $location: $location }); expect(ctrl.autoPagingEnabled()).toBe(true); @@ -372,7 +379,8 @@ describe('ContentController', function () { expect(ctrl.autoPagingEnabled()).toBe(false); expect(Loading.isLoading('autopaging')).toBe(false); - expect(ItemResource.autoPage).toHaveBeenCalledWith(3, 2, true, false); + expect(ItemResource.autoPage).toHaveBeenCalledWith(3, 2, true, false, + 'some+string'); })); |