2015-08-06 17:11:15 +02:00
|
|
|
var chai = require('chai');
|
2017-01-26 10:24:14 +01:00
|
|
|
var Iban = require('../packages/web3-core-iban');
|
|
|
|
|
2015-08-06 17:11:15 +02:00
|
|
|
var assert = chai.assert;
|
|
|
|
|
|
|
|
var tests = [
|
|
|
|
{ institution: 'XREG', identifier: 'GAVOFYORK', expected: 'XE81ETHXREGGAVOFYORK'}
|
|
|
|
];
|
|
|
|
|
|
|
|
describe('lib/web3/iban', function () {
|
|
|
|
describe('createIndirect', function () {
|
|
|
|
tests.forEach(function (test) {
|
|
|
|
it('shoud create indirect iban: ' + test.expected, function () {
|
|
|
|
assert.deepEqual(Iban.createIndirect({
|
|
|
|
institution: test.institution,
|
|
|
|
identifier: test.identifier
|
|
|
|
}), new Iban(test.expected));
|
|
|
|
});
|
2017-01-26 10:24:14 +01:00
|
|
|
});
|
2015-08-06 17:11:15 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|