-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reconfigure unsuccessful login attempt to purge user session
Delete X-Miq-Group header when purging session
- Loading branch information
Showing
3 changed files
with
51 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
describe('State: login', () => { | ||
let failureNotificationSpy | ||
beforeEach(() => { | ||
module('app.states'); | ||
}); | ||
module('app.states') | ||
|
||
describe('controller', () => { | ||
let ctrl; | ||
}) | ||
|
||
describe('controller', () => { | ||
let ctrl | ||
beforeEach(() => { | ||
bard.inject('$controller', '$state', '$stateParams', 'Session', '$window', 'API_LOGIN', 'API_PASSWORD'); | ||
|
||
ctrl = $controller($state.get('login').controller, { | ||
Session: { | ||
privilegesError: true | ||
} | ||
}); | ||
}); | ||
bard.inject('$controller', '$state', '$stateParams', 'Session', '$window', 'API_LOGIN', 'API_PASSWORD', 'EventNotifications') | ||
failureNotificationSpy = sinon.spy(EventNotifications, 'error') | ||
ctrl = $controller($state.get('login').controller, {}) | ||
}) | ||
|
||
describe('controller initialization', () => { | ||
it('is created successfully', () => { | ||
expect(ctrl).to.be.defined; | ||
}); | ||
expect(ctrl).to.be.defined | ||
}) | ||
|
||
it('sets app brand', () => { | ||
expect(ctrl.text.brand).to.equal('<strong>ManageIQ</strong> Service UI'); | ||
}); | ||
}); | ||
}); | ||
}); | ||
expect(ctrl.text.brand).to.equal('<strong>ManageIQ</strong> Service UI') | ||
}) | ||
|
||
it('sets session timeoutNotified and privilegesError', () => { | ||
ctrl.onSubmit() | ||
expect(Session.timeoutNotified).to.be.false | ||
expect(Session.privilegesError).to.be.false | ||
}) | ||
}) | ||
}) | ||
}) |