Skip to content

Commit

Permalink
Fix console test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Feb 2, 2019
1 parent 82bdb5e commit 6018422
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/legacy/core_plugins/console/public/src/__tests__/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('app initialization', () => {
sandbox.stub(mappings, 'startRetrievingAutoCompleteInfo');

inputMock = {
autoIndent: sinon.stub(),
update: sinon.stub(),
moveToNextRequestEdge: sinon.stub(),
highlightCurrentRequestsAndUpdateActionBar: sinon.stub(),
Expand Down Expand Up @@ -102,12 +103,12 @@ describe('app initialization', () => {
sinon.assert.calledWithExactly(outputMock.update, '');
});

it('correctly loads state from commands query param', () => {
it('correctly loads state from text source', () => {
init(inputMock, outputMock, 'text', 'GET /testIndex');

sinon.assert.notCalled();
sinon.assert.notCalled($.ajax);

sinon.assert.calledOnce(inputMock.autoIndent());
sinon.assert.calledOnce(inputMock.autoIndent);
sinon.assert.calledTwice(inputMock.moveToNextRequestEdge);
sinon.assert.calledWithExactly(inputMock.moveToNextRequestEdge, true);
sinon.assert.calledOnce(inputMock.highlightCurrentRequestsAndUpdateActionBar);
Expand Down

0 comments on commit 6018422

Please sign in to comment.