mirror of https://github.com/BTCPrivate/copay.git
skip PayPro test in browser, they break in travis
This commit is contained in:
parent
560465b6c1
commit
9047f4f30b
|
@ -3,8 +3,7 @@
|
||||||
var chai = chai || require('chai');
|
var chai = chai || require('chai');
|
||||||
var should = chai.should();
|
var should = chai.should();
|
||||||
var sinon = require('sinon');
|
var sinon = require('sinon');
|
||||||
var is_browser = typeof process == 'undefined'
|
var is_browser = typeof process == 'undefined' || typeof process.versions === 'undefined';
|
||||||
|| typeof process.versions === 'undefined';
|
|
||||||
if (is_browser) {
|
if (is_browser) {
|
||||||
var copay = require('copay'); //browser
|
var copay = require('copay'); //browser
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,6 +41,7 @@ var getNewEpk = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('PayPro (in Wallet) model', function() {
|
describe('PayPro (in Wallet) model', function() {
|
||||||
|
if (!is_browser) {
|
||||||
var createW = function(N, conf) {
|
var createW = function(N, conf) {
|
||||||
var c = JSON.parse(JSON.stringify(conf || walletConfig));
|
var c = JSON.parse(JSON.stringify(conf || walletConfig));
|
||||||
if (!N) N = c.totalCopayers;
|
if (!N) N = c.totalCopayers;
|
||||||
|
@ -165,8 +165,7 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
var req = {
|
var req = {
|
||||||
headers: {
|
headers: {
|
||||||
'Host': 'localhost:8080',
|
'Host': 'localhost:8080',
|
||||||
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE
|
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE + ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
||||||
+ ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
|
||||||
'Content-Type': 'application/octet-stream',
|
'Content-Type': 'application/octet-stream',
|
||||||
'Content-Length': '0'
|
'Content-Length': '0'
|
||||||
},
|
},
|
||||||
|
@ -345,8 +344,7 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
var req = {
|
var req = {
|
||||||
headers: {
|
headers: {
|
||||||
'Host': 'localhost:8080',
|
'Host': 'localhost:8080',
|
||||||
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE
|
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE + ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
||||||
+ ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
|
||||||
'Content-Type': PayPro.PAYMENT_CONTENT_TYPE,
|
'Content-Type': PayPro.PAYMENT_CONTENT_TYPE,
|
||||||
'Content-Length': pay.length + ''
|
'Content-Length': pay.length + ''
|
||||||
},
|
},
|
||||||
|
@ -414,8 +412,7 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
var req = {
|
var req = {
|
||||||
headers: {
|
headers: {
|
||||||
'Host': 'localhost:8080',
|
'Host': 'localhost:8080',
|
||||||
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE
|
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE + ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
||||||
+ ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
|
||||||
'Content-Type': 'application/octet-stream',
|
'Content-Type': 'application/octet-stream',
|
||||||
'Content-Length': '0'
|
'Content-Length': '0'
|
||||||
},
|
},
|
||||||
|
@ -594,8 +591,7 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
var req = {
|
var req = {
|
||||||
headers: {
|
headers: {
|
||||||
'Host': 'localhost:8080',
|
'Host': 'localhost:8080',
|
||||||
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE
|
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE + ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
||||||
+ ', ' + PayPro.PAYMENT_ACK_CONTENT_TYPE,
|
|
||||||
'Content-Type': PayPro.PAYMENT_CONTENT_TYPE,
|
'Content-Type': PayPro.PAYMENT_CONTENT_TYPE,
|
||||||
'Content-Length': pay.length + ''
|
'Content-Length': pay.length + ''
|
||||||
},
|
},
|
||||||
|
@ -718,7 +714,9 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
if (w.isShared()) {
|
if (w.isShared()) {
|
||||||
return done();
|
return done();
|
||||||
} else {
|
} else {
|
||||||
w.sendPaymentTx(ntxid, { memo: memo }, function(txid, merchantData) {
|
w.sendPaymentTx(ntxid, {
|
||||||
|
memo: memo
|
||||||
|
}, function(txid, merchantData) {
|
||||||
should.exist(txid);
|
should.exist(txid);
|
||||||
should.exist(merchantData);
|
should.exist(merchantData);
|
||||||
return done();
|
return done();
|
||||||
|
@ -892,4 +890,5 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
return done();
|
return done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue