Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mockable status codes #25

Merged
merged 4 commits into from
Apr 5, 2016
Merged

Mockable status codes #25

merged 4 commits into from
Apr 5, 2016

Conversation

LeopoldoFu
Copy link
Contributor

No description provided.

…ode is 200 and error for all other status codes.

Merge in default status code 200.
Add test for support for specifying status code in response.
@@ -95,7 +95,12 @@ function mock(superagent) {
if (current) {
setTimeout(function() {
try {
cb && cb(null, current(state.request));
var response = current(state.request);
if (response.status !== 200) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just think the documentation needs to be clear after this is merged that status will refer to the status code returned. I could see people getting confused if they just have 'status' as a regular property name for part of a response payload and it causes their requests to return errors

@A A self-assigned this Mar 7, 2016
@serga-kiev
Copy link
Collaborator

Hi, guys! Is this pull-request going to be merged ever?:)

@LeopoldoFu
Copy link
Contributor Author

Doesn't look like I have permission to merge?

@A A merged commit 9013def into A:master Apr 5, 2016
@A
Copy link
Owner

A commented Apr 5, 2016

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants