diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-21 00:50:52 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-21 13:36:50 +0100 |
commit | c0e6ca12e83e27b2ef86a58f9a44c0248e711a75 (patch) | |
tree | c3710a516ca17aa99e46112c2a911985174fec28 /js/tests/unit | |
parent | dde0b1c0e72e7ffa9ef1ea01246effc50eff9667 (diff) |
implement clientside search code
Diffstat (limited to 'js/tests/unit')
-rw-r--r-- | js/tests/unit/controller/NavigationControllerSpec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js index 22c510c3f..d6b016c9a 100644 --- a/js/tests/unit/controller/NavigationControllerSpec.js +++ b/js/tests/unit/controller/NavigationControllerSpec.js @@ -1038,4 +1038,19 @@ describe('NavigationController', function () { })); + it ('should set location on search', inject(function ($controller) { + var location = { + search: jasmine.createSpy('search') + }; + var ctrl = $controller('NavigationController', { + $location: location + }); + + ctrl.search(''); + expect(location.search).toHaveBeenCalledWith('search', null); + + ctrl.search('ab'); + expect(location.search).toHaveBeenCalledWith('search', 'ab'); + })); + }); |