Add test for findById returning 404

The test verifies the remoting configuration of
loopback-datasource-juggler, ensuring that
`DataAccessObject.findById()` has `rest.before` handler
correctly set up.
This commit is contained in:
Miroslav Bajtos 2013-11-21 16:17:19 +01:00
parent 52b1588152
commit cf541cb828
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(){