Merge pull request #75 from strongloop/feature/get-unknown-id-should-return-404
Add test for findById returning 404
This commit is contained in:
commit
dc57ff0c71
|
@ -296,6 +296,13 @@ describe('Model', function() {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Converts null result of findById to 404 Not Found', function(done) {
|
||||||
|
request(app)
|
||||||
|
.get('/users/not-found')
|
||||||
|
.expect(404)
|
||||||
|
.end(done);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Model.beforeRemote(name, fn)', function(){
|
describe('Model.beforeRemote(name, fn)', function(){
|
||||||
|
|
Loading…
Reference in New Issue