mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Mobile] Tests
Fixed BrowseControllerSpec test to account for new call. Now expects destroy and select-obj calls.
This commit is contained in:
parent
cd46dab5c1
commit
d80c359a86
@ -164,7 +164,12 @@ define(
|
||||
// lets the html code know if the
|
||||
// tree menu is open.
|
||||
it("calls the treeSlide function", function () {
|
||||
mockScope.treeSlide();
|
||||
expect(mockScope.$on).toHaveBeenCalledWith(
|
||||
"select-obj",
|
||||
jasmine.any(Function)
|
||||
);
|
||||
|
||||
mockScope.$on.calls[1].args[1]();
|
||||
});
|
||||
|
||||
it("releases its navigation listener when its scope is destroyed", function () {
|
||||
@ -172,7 +177,8 @@ define(
|
||||
"$destroy",
|
||||
jasmine.any(Function)
|
||||
);
|
||||
mockScope.$on.mostRecentCall.args[1]();
|
||||
|
||||
mockScope.$on.calls[0].args[1]();
|
||||
// Should remove the listener it added earlier
|
||||
expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
|
||||
mockNavigationService.addListener.mostRecentCall.args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user