mirror of
https://github.com/nasa/openmct.git
synced 2025-04-25 13:29:51 +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
|
// lets the html code know if the
|
||||||
// tree menu is open.
|
// tree menu is open.
|
||||||
it("calls the treeSlide function", function () {
|
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 () {
|
it("releases its navigation listener when its scope is destroyed", function () {
|
||||||
@ -172,7 +177,8 @@ define(
|
|||||||
"$destroy",
|
"$destroy",
|
||||||
jasmine.any(Function)
|
jasmine.any(Function)
|
||||||
);
|
);
|
||||||
mockScope.$on.mostRecentCall.args[1]();
|
|
||||||
|
mockScope.$on.calls[0].args[1]();
|
||||||
// Should remove the listener it added earlier
|
// Should remove the listener it added earlier
|
||||||
expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
|
expect(mockNavigationService.removeListener).toHaveBeenCalledWith(
|
||||||
mockNavigationService.addListener.mostRecentCall.args[0]
|
mockNavigationService.addListener.mostRecentCall.args[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user