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:
parent
52b1588152
commit
cf541cb828
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue