|
|
@ -1,7 +1,6 @@ |
|
|
|
import assert from 'assert' |
|
|
|
import assert from 'assert' |
|
|
|
import sinon from 'sinon' |
|
|
|
import sinon from 'sinon' |
|
|
|
import ObservableStore from 'obs-store' |
|
|
|
import ObservableStore from 'obs-store' |
|
|
|
import HttpProvider from 'ethjs-provider-http' |
|
|
|
|
|
|
|
import EnsController from '../../../../app/scripts/controllers/ens' |
|
|
|
import EnsController from '../../../../app/scripts/controllers/ens' |
|
|
|
|
|
|
|
|
|
|
|
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' |
|
|
|
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' |
|
|
@ -10,11 +9,10 @@ const ZERO_X_ERROR_ADDRESS = '0x' |
|
|
|
describe('EnsController', function () { |
|
|
|
describe('EnsController', function () { |
|
|
|
describe('#constructor', function () { |
|
|
|
describe('#constructor', function () { |
|
|
|
it('should construct the controller given a provider and a network', async function () { |
|
|
|
it('should construct the controller given a provider and a network', async function () { |
|
|
|
const provider = new HttpProvider('https://ropsten.infura.io') |
|
|
|
|
|
|
|
const currentNetworkId = '3' |
|
|
|
const currentNetworkId = '3' |
|
|
|
const networkStore = new ObservableStore(currentNetworkId) |
|
|
|
const networkStore = new ObservableStore(currentNetworkId) |
|
|
|
const ens = new EnsController({ |
|
|
|
const ens = new EnsController({ |
|
|
|
provider, |
|
|
|
provider: { }, |
|
|
|
networkStore, |
|
|
|
networkStore, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|