mirror of
https://github.com/nasa/openmct.git
synced 2024-12-28 08:58:52 +00:00
[Inspector] Add test
Added a test to the browse object controller to regain 100% coverage. Tests initilization of ngModel properties. #73.
This commit is contained in:
parent
05fb7173aa
commit
7a69bffb4a
@ -102,6 +102,22 @@ define(
|
||||
.toEqual(testViews[1]);
|
||||
});
|
||||
|
||||
it("sets ngModel properties on initialization", function () {
|
||||
// Left pane open status depends on how the window was opened
|
||||
// Case 1: undefined opener
|
||||
expect(mockWindow.opener).not.toBeDefined();
|
||||
expect(mockScope.ngModel.leftPane).toBeTruthy();
|
||||
|
||||
// Case 2: defined opener
|
||||
mockWindow.opener = {};
|
||||
controller = new BrowseObjectController(
|
||||
mockScope,
|
||||
mockLocation,
|
||||
mockRoute,
|
||||
mockWindow
|
||||
);
|
||||
expect(mockScope.ngModel.leftPane).toBeFalsy();
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user