Skip to content

Commit

Permalink
mainmatter#1093 test related to your update in the invalidate with pa…
Browse files Browse the repository at this point in the history
…rams
  • Loading branch information
mahtrifork committed Nov 11, 2016
1 parent c33442a commit 141d645
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/unit/internal-session-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,17 @@ describe('InternalSession', () => {
return session.authenticate('authenticator');
});

describe('when the authenticator resolves invaldiation', () => {
describe('when the authenticator resolves invalidation with params', () => {
it('when some data is sent with invalidate', () => {
let invalidateSession = sinon.spy(authenticator, 'invalidate');
let param = { some: 'random data' };
session.invalidate(param);
invalidateSession.restore();
sinon.assert.calledWith(invalidateSession, session.get('authenticated') , param);
});
});

describe('when the authenticator resolves invalidation', () => {
beforeEach(() => {
sinon.stub(authenticator, 'invalidate').returns(RSVP.resolve());
});
Expand Down

0 comments on commit 141d645

Please sign in to comment.