Last active
November 23, 2016 02:45
-
-
Save mearns/f8c993fd339abbd0678f92816edafeb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GIVEN | |
const mockClient = { | |
post: sandbox.stub().returns(EXPECTED_RESPONSE_BODY) | |
}; | |
// WHEN | |
makeRestApiCall(mockClient, EXPECTED_POST_DATA); | |
// THEN | |
expect(mockClient.post).to.have.been | |
.calledWith('http://example.com/rest/api/expectedEndpoint', EXPECTED_POST_DATA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment