[sql lab] handle large ints, prevent overflow (#5829)

* [sql lab] handle large ints, prevent overflow

* Fix tests
This commit is contained in:
Maxime Beauchemin
2018-09-10 22:16:18 -07:00
committed by Beto Dealmeida
parent 73db918fbe
commit 039e7c56d8
5 changed files with 17 additions and 14 deletions

View File

@@ -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);
@@ -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();