@ -27,7 +27,7 @@ describe('# Network Controller', function () {
} )
} )
} )
} )
describe ( 'network' , function ( ) {
describe ( 'network' , function ( ) {
describe ( '#provider' , function ( ) {
describe ( '#provider' , function ( ) {
it ( 'provider should be updatable without reassignment' , function ( ) {
it ( 'provider should be updatable without reassignment' , function ( ) {
networkController . initializeProvider ( networkController . providerInit )
networkController . initializeProvider ( networkController . providerInit )
const provider = networkController . provider
const provider = networkController . provider
@ -37,7 +37,7 @@ describe('# Network Controller', function () {
} )
} )
describe ( '#getNetworkState' , function ( ) {
describe ( '#getNetworkState' , function ( ) {
it ( 'should return loading when new' , function ( ) {
it ( 'should return loading when new' , function ( ) {
le t networkState = networkController . getNetworkState ( )
cons t networkState = networkController . getNetworkState ( )
assert . equal ( networkState , 'loading' , 'network is loading' )
assert . equal ( networkState , 'loading' , 'network is loading' )
} )
} )
} )
} )
@ -45,14 +45,14 @@ describe('# Network Controller', function () {
describe ( '#setNetworkState' , function ( ) {
describe ( '#setNetworkState' , function ( ) {
it ( 'should update the network' , function ( ) {
it ( 'should update the network' , function ( ) {
networkController . setNetworkState ( 1 )
networkController . setNetworkState ( 1 )
le t networkState = networkController . getNetworkState ( )
cons t networkState = networkController . getNetworkState ( )
assert . equal ( networkState , 1 , 'network is 1' )
assert . equal ( networkState , 1 , 'network is 1' )
} )
} )
} )
} )
describe ( '#getRpcAddressForType' , function ( ) {
describe ( '#getRpcAddressForType' , function ( ) {
it ( 'should return the right rpc address' , function ( ) {
it ( 'should return the right rpc address' , function ( ) {
le t rpcTarget = networkController . getRpcAddressForType ( 'mainnet' )
cons t rpcTarget = networkController . getRpcAddressForType ( 'mainnet' )
assert . equal ( rpcTarget , 'https://mainnet.infura.io/metamask' , 'returns the right rpcAddress' )
assert . equal ( rpcTarget , 'https://mainnet.infura.io/metamask' , 'returns the right rpcAddress' )
} )
} )
} )
} )