You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
50 lines
1.4 KiB
4 years ago
|
import assert from 'assert';
|
||
4 years ago
|
import {
|
||
|
KOVAN_CHAIN_ID,
|
||
|
MAINNET_CHAIN_ID,
|
||
|
RINKEBY_CHAIN_ID,
|
||
|
ROPSTEN_CHAIN_ID,
|
||
|
} from '../../../shared/constants/network';
|
||
4 years ago
|
import getBuyEthUrl from './buy-eth-url';
|
||
7 years ago
|
|
||
5 years ago
|
describe('buy-eth-url', function () {
|
||
7 years ago
|
const mainnet = {
|
||
4 years ago
|
chainId: MAINNET_CHAIN_ID,
|
||
7 years ago
|
amount: 5,
|
||
|
address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
|
||
4 years ago
|
};
|
||
7 years ago
|
const ropsten = {
|
||
4 years ago
|
chainId: ROPSTEN_CHAIN_ID,
|
||
4 years ago
|
};
|
||
7 years ago
|
const rinkeby = {
|
||
4 years ago
|
chainId: RINKEBY_CHAIN_ID,
|
||
4 years ago
|
};
|
||
7 years ago
|
const kovan = {
|
||
4 years ago
|
chainId: KOVAN_CHAIN_ID,
|
||
4 years ago
|
};
|
||
7 years ago
|
|
||
5 years ago
|
it('returns wyre url with address for network 1', function () {
|
||
4 years ago
|
const wyreUrl = getBuyEthUrl(mainnet);
|
||
6 years ago
|
|
||
4 years ago
|
assert.equal(
|
||
|
wyreUrl,
|
||
|
'https://pay.sendwyre.com/purchase?dest=ethereum:0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc&destCurrency=ETH&accountId=AC-7AG3W4XH4N2&paymentMethod=debit-card',
|
||
4 years ago
|
);
|
||
|
});
|
||
7 years ago
|
|
||
|
it('returns metamask ropsten faucet for network 3', function () {
|
||
4 years ago
|
const ropstenUrl = getBuyEthUrl(ropsten);
|
||
|
assert.equal(ropstenUrl, 'https://faucet.metamask.io/');
|
||
|
});
|
||
7 years ago
|
|
||
|
it('returns rinkeby dapp for network 4', function () {
|
||
4 years ago
|
const rinkebyUrl = getBuyEthUrl(rinkeby);
|
||
|
assert.equal(rinkebyUrl, 'https://www.rinkeby.io/');
|
||
|
});
|
||
7 years ago
|
|
||
|
it('returns kovan github test faucet for network 42', function () {
|
||
4 years ago
|
const kovanUrl = getBuyEthUrl(kovan);
|
||
|
assert.equal(kovanUrl, 'https://github.com/kovan-testnet/faucet');
|
||
|
});
|
||
|
});
|