Merge pull request #75 from strongloop/feature/get-unknown-id-should-return-404

Add test for findById returning 404
This commit is contained in:
Miroslav Bajtoš 2013-11-21 10:20:25 -08:00
commit dc57ff0c71
1 changed files with 7 additions and 0 deletions

View File

@ -296,6 +296,13 @@ describe('Model', function() {
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(){