mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #782 from roramirez/fail-auth-calendar
Add test module calendar fail basic auth
This commit is contained in:
commit
f1d8bb84b7
44
tests/configs/modules/calendar/fail-basic-auth.js
Normal file
44
tests/configs/modules/calendar/fail-basic-auth.js
Normal file
@ -0,0 +1,44 @@
|
||||
/* Magic Mirror Test calendar calendar
|
||||
*
|
||||
* This configuration is a wrong authentication
|
||||
*
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
var config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
language: "en",
|
||||
timeFormat: 12,
|
||||
units: "metric",
|
||||
electronOptions: {
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
},
|
||||
},
|
||||
|
||||
modules: [
|
||||
{
|
||||
module: "calendar",
|
||||
position: "bottom_bar",
|
||||
config: {
|
||||
calendars: [
|
||||
{
|
||||
maximumNumberOfDays: 10000,
|
||||
url: "http://localhost:8020/tests/configs/data/calendar_test.ics",
|
||||
auth: {
|
||||
user: "MagicMirror",
|
||||
pass: "StairwayToHeaven",
|
||||
method: "basic"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== "undefined") {module.exports = config;}
|
@ -65,6 +65,17 @@ describe("Calendar module", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Fail Basic auth", function() {
|
||||
before(function() {
|
||||
serverBasicAuth.listen(8020);
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/fail-basic-auth.js";
|
||||
});
|
||||
|
||||
it("Should return No upcoming events", function () {
|
||||
return app.client.waitUntilTextExists(".calendar", "No upcoming events.", 10000);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user