mirror of
https://github.com/nasa/openmct.git
synced 2025-04-13 22:23:13 +00:00
[Windowing] Unit Test Adjustment
Added comments to the NewWindowActionSpec.js file. WTD-16.
This commit is contained in:
parent
02265c82d6
commit
dc4436e890
@ -32,6 +32,9 @@ define(
|
||||
mockCurrentUrl;
|
||||
|
||||
beforeEach(function () {
|
||||
// Creates a mockWindow from $window, then
|
||||
// the mockWindow's location.href is set
|
||||
// to a mock Url
|
||||
mockWindow = jasmine.createSpyObj("$window", ["open", "location"]);
|
||||
mockWindow.location.href = "http://www.mockUrl.com";
|
||||
action = new NewWindowAction(mockWindow);
|
||||
@ -39,6 +42,8 @@ define(
|
||||
});
|
||||
|
||||
it("New window is opened", function () {
|
||||
// The expection is that the mockWindow
|
||||
// will be called with it's location.href
|
||||
action.perform();
|
||||
expect(mockWindow.open).toHaveBeenCalledWith("http://www.mockUrl.com");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user