Skip to content

Commit

Permalink
Update fetchCurrentUser-test.js (#3582)
Browse files Browse the repository at this point in the history
Changing current example (jQuery test) for simplify the understanding

The motivation for this change is why the output for current example (in verbose mode) is very strange
  • Loading branch information
leonardosouza authored and cpojer committed May 16, 2017
1 parent 5f9c1f9 commit 6cf16f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jquery/__tests__/fetchCurrentUser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ it('calls the callback when $.ajax requests are finished', () => {
// callback
$.ajax.mock.calls[0 /*first call*/][0 /*first argument*/].success({
firstName: 'Bobby',
lastName: '");DROP TABLE Users;--',
lastName: 'Marley',
});

// And finally we assert that this emulated call by `$.ajax` incurred a
// call back into the mock function we provided as a callback
expect(callback.mock.calls[0 /*first call*/][0 /*first arg*/]).toEqual({
fullName: 'Bobby ");DROP TABLE Users;--',
fullName: 'Bobby Marley',
loggedIn: true,
});
});

0 comments on commit 6cf16f1

Please sign in to comment.