Merge pull request #170 from strongloop/feature/add-app-isAuthEnabled
Add app.isAuthEnabled.
This commit is contained in:
commit
a506ced005
|
@ -305,7 +305,9 @@ app.enableAuth = function() {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
this.isAuthEnabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize an application from an options object or a set of JSON and JavaScript files.
|
* Initialize an application from an options object or a set of JSON and JavaScript files.
|
||||||
|
|
|
@ -400,6 +400,14 @@ describe('app', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('enableAuth', function() {
|
||||||
|
it('should set app.isAuthEnabled to true', function() {
|
||||||
|
expect(app.isAuthEnabled).to.not.equal(true);
|
||||||
|
app.enableAuth();
|
||||||
|
expect(app.isAuthEnabled).to.equal(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('app.get("/", loopback.status())', function () {
|
describe('app.get("/", loopback.status())', function () {
|
||||||
it('should return the status of the application', function (done) {
|
it('should return the status of the application', function (done) {
|
||||||
var app = loopback();
|
var app = loopback();
|
||||||
|
|
Loading…
Reference in New Issue