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
641 B

import assert from 'assert'
import freeze from 'deep-freeze-strict'
import reducers from '../../../ui/app/ducks'
import { actionConstants } from '../../../ui/app/store/actions'
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)
})
})