mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[Search] Update test
Updated the search controller test for the dependancy on the throttle service. #91.
This commit is contained in:
parent
e045ce223b
commit
9593855c3f
@ -36,6 +36,7 @@ define(
|
||||
describe("The search controller", function () {
|
||||
var mockScope,
|
||||
mockSearchService,
|
||||
mockThrottle,
|
||||
mockPromise,
|
||||
mockSearchResult,
|
||||
mockDomainObject,
|
||||
@ -73,6 +74,11 @@ define(
|
||||
);
|
||||
mockSearchService.query.andReturn(mockPromise);
|
||||
|
||||
mockThrottle = jasmine.createSpy('throttle');
|
||||
mockThrottle.andCallFake(function (fn) {
|
||||
return fn;
|
||||
});
|
||||
|
||||
mockTypes = [{key: 'mock.type', name: 'Mock Type', glyph: '?'}];
|
||||
|
||||
mockSearchResult = jasmine.createSpyObj(
|
||||
@ -86,7 +92,7 @@ define(
|
||||
mockSearchResult.object = mockDomainObject;
|
||||
mockDomainObject.getModel.andReturn({name: 'Mock Object', type: 'mock.type'});
|
||||
|
||||
controller = new SearchController(mockScope, mockSearchService, mockTypes);
|
||||
controller = new SearchController(mockScope, mockSearchService, mockThrottle);
|
||||
controller.search();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user