diff --git a/tests/pushover.test.js b/tests/pushover.test.js index db8b0dea9e8..c49cc44cf3a 100644 --- a/tests/pushover.test.js +++ b/tests/pushover.test.js @@ -3,6 +3,10 @@ var should = require('should'); var levels = require('../lib/levels'); +var ctx = { + levels:levels +} + describe('pushover', function ( ) { var baseurl = 'https://nightscout.test'; @@ -20,7 +24,7 @@ describe('pushover', function ( ) { , levels:levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('convert a warning to a message and send it', function (done) { @@ -79,7 +83,7 @@ describe('support legacy pushover groupkey', function ( ) { , levels: levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('send', function (done) { @@ -116,7 +120,7 @@ describe('multi announcement pushover', function ( ) { , levels: levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('send multiple pushes if there are multiple keys', function (done) { @@ -161,7 +165,7 @@ describe('announcement only pushover', function ( ) { , levels: levels }; - var pushover = require('../lib/plugins/pushover')(env); + var pushover = require('../lib/plugins/pushover')(env, ctx); it('send push if announcement', function (done) {