A Metamask fork with Infura removed and default networks editable
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.
 
 
 
 
 
ciphermask/test/unit/actions/set_selected_account_test.js

24 lines
650 B

import assert from 'assert'
import freeze from 'deep-freeze-strict'
import reducers from '../../../ui/app/ducks'
import * as actionConstants from '../../../ui/app/store/actionConstants'
describe('SHOW_ACCOUNT_DETAIL', function () {
it('updates metamask state', function () {
const initialState = {
metamask: {
selectedAddress: 'foo',
},
}
freeze(initialState)
const action = {
type: actionConstants.SHOW_ACCOUNT_DETAIL,
value: 'bar',
}
freeze(action)
const resultingState = reducers(initialState, action)
assert.equal(resultingState.metamask.selectedAddress, action.value)
})
})