mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 21:11:17 +00:00
Fix conflict with CHANGELOG, merge with upstream/develop
This commit is contained in:
30
tests/e2e/ipWhistlist_spec.js
Normal file
30
tests/e2e/ipWhistlist_spec.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const globalSetup = require("./global-setup");
|
||||
const app = globalSetup.app;
|
||||
const request = require("request");
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
|
||||
describe("Set ipWhitelist without access", function () {
|
||||
|
||||
this.timeout(20000);
|
||||
|
||||
before(function() {
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/noIpWhiteList.js";
|
||||
});
|
||||
|
||||
beforeEach(function (done) {
|
||||
app.start().then(function() { done(); } );
|
||||
});
|
||||
|
||||
afterEach(function (done) {
|
||||
app.stop().then(function() { done(); });
|
||||
});
|
||||
|
||||
it("should return 403", function (done) {
|
||||
request.get("http://localhost:8080", function (err, res, body) {
|
||||
expect(res.statusCode).to.equal(403);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user