Merge pull request #4 from strongloop/feature/fix-failing-unit-test

Reorder middleware to fix unit-test failures.
This commit is contained in:
Miroslav Bajtoš 2013-12-09 08:17:04 -08:00
commit 066511775a
1 changed files with 5 additions and 1 deletions

View File

@ -71,8 +71,12 @@ describe('explorer', function() {
app.use(restUrlBase, loopback.rest());
app.use('/explorer', explorer(app, { basePath: restUrlBase }));
} else {
app.use(loopback.rest());
// LoopBack REST adapter owns the whole URL space and does not
// let other middleware handle same URLs.
// It's possible to circumvent this measure by installing
// the explorer middleware before the REST middleware.
app.use('/explorer', explorer(app));
app.use(loopback.rest());
}
done();
}