A / superagent-mocker

Pretty simple in-browser mocks for CRUD and REST API
132 stars 32 forks source link

Treat other 20x statuses (besides 200) as success #38

Closed kmudrick closed 8 years ago

kmudrick commented 8 years ago

Previously, if you had return a status of, say, 204, this library treated it as non-success and invoked the end callback with an error.

Documentation indicates that 200 through 206 are successful responses: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 05f1a855040863f06d87e6e45d446ff81053d137 on kmudrick:treat-20x-as-success into 13f69e5e17b90560f74c3dde65c68eb3eeb0cb12 on A:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 05f1a855040863f06d87e6e45d446ff81053d137 on kmudrick:treat-20x-as-success into 13f69e5e17b90560f74c3dde65c68eb3eeb0cb12 on A:master.

tbranyen commented 8 years ago

Looks good, thanks!