Skip to content

Commit

Permalink
Fix pushover test
Browse files Browse the repository at this point in the history
  • Loading branch information
sulkaharo committed Dec 14, 2020
1 parent 7c3ab00 commit d81e342
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/pushover.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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) {

Expand Down Expand Up @@ -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) {

Expand Down Expand Up @@ -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) {

Expand Down Expand Up @@ -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) {

Expand Down

0 comments on commit d81e342

Please sign in to comment.