Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Sep 11, 2018
1 parent 2589d2f commit ab6bef7
Show file tree
Hide file tree
Showing 3 changed files with 481 additions and 514 deletions.
9 changes: 1 addition & 8 deletions superset/assets/spec/javascripts/sqllab/actions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('async actions', () => {
});

it('calls querySuccess on ajax success', () => {
ajaxStub.yieldsTo('success', { data: '' });
ajaxStub.yieldsTo('success', '{ "data": "" }');
makeRequest();
expect(dispatch.callCount).to.equal(2);
expect(dispatch.getCall(1).args[0].type).to.equal(actions.QUERY_SUCCESS);
Expand Down Expand Up @@ -86,13 +86,6 @@ describe('async actions', () => {
expect(dispatch.args[0][0].type).to.equal(actions.START_QUERY);
});

it('calls querySuccess on ajax success', () => {
ajaxStub.yieldsTo('success', { data: '' });
makeRequest();
expect(dispatch.callCount).to.equal(2);
expect(dispatch.getCall(1).args[0].type).to.equal(actions.QUERY_SUCCESS);
});

it('calls queryFailed on ajax error', () => {
ajaxStub.yieldsTo('error', { responseJSON: { error: 'error text' } });
makeRequest();
Expand Down
Loading

0 comments on commit ab6bef7

Please sign in to comment.