Merge pull request #6 from cmgustavo/bug/test-notifications-01

Fix tests for notifications
This commit is contained in:
Ivan Socolsky 2017-02-03 19:38:28 -03:00 committed by GitHub
commit 51114b3bff
2 changed files with 0 additions and 13 deletions

View File

@ -98,11 +98,8 @@ describe('Email notifications', function() {
var one = emails[0];
one.from.should.equal('bws@dummy.net');
one.subject.should.contain('New payment proposal');
one.text.should.contain(wallet.name);
one.text.should.contain(wallet.copayers[0].name);
should.exist(one.html);
one.html.indexOf('<html>').should.equal(0);
one.html.should.contain(wallet.name);
server.storage.fetchUnsentEmails(function(err, unsent) {
should.not.exist(err);
unsent.should.be.empty;
@ -202,7 +199,6 @@ describe('Email notifications', function() {
var one = emails[0];
one.from.should.equal('bws@dummy.net');
one.subject.should.contain('Payment sent');
one.text.should.contain(wallet.name);
one.text.should.contain('800,000');
should.exist(one.html);
one.html.should.contain('https://insight.bitpay.com/tx/' + txp.txid);
@ -258,9 +254,6 @@ describe('Email notifications', function() {
var one = emails[0];
one.from.should.equal('bws@dummy.net');
one.subject.should.contain('Payment proposal rejected');
one.text.should.contain(wallet.name);
one.text.should.contain('copayer 2, copayer 3');
one.text.should.not.contain('copayer 1');
server.storage.fetchUnsentEmails(function(err, unsent) {
should.not.exist(err);
unsent.should.be.empty;
@ -291,7 +284,6 @@ describe('Email notifications', function() {
var one = emails[0];
one.from.should.equal('bws@dummy.net');
one.subject.should.contain('New payment received');
one.text.should.contain(wallet.name);
one.text.should.contain('123,000');
server.storage.fetchUnsentEmails(function(err, unsent) {
should.not.exist(err);
@ -327,7 +319,6 @@ describe('Email notifications', function() {
var one = emails[0];
one.from.should.equal('bws@dummy.net');
one.subject.should.contain('New payment received');
one.text.should.contain(wallet.name);
one.text.should.contain('123,000');
server.storage.fetchUnsentEmails(function(err, unsent) {
should.not.exist(err);
@ -367,14 +358,12 @@ describe('Email notifications', function() {
});
spanish.from.should.equal('bws@dummy.net');
spanish.subject.should.contain('Nuevo pago recibido');
spanish.text.should.contain(wallet.name);
spanish.text.should.contain('0.123 BTC');
var english = _.find(emails, {
to: 'copayer2@domain.com'
});
english.from.should.equal('bws@dummy.net');
english.subject.should.contain('New payment received');
english.text.should.contain(wallet.name);
english.text.should.contain('123,000 bits');
done();
}, 100);

View File

@ -362,8 +362,6 @@ describe('Push notifications', function() {
});
args[0].body.notification.title.should.contain('Payment proposal rejected');
args[0].body.notification.body.should.contain('copayer 2, copayer 3');
args[0].body.notification.body.should.not.contain('copayer 1');
done();
}, 100);
});