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

25 lines
662 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';
8 years ago
describe('SHOW_ACCOUNT_DETAIL', function () {
it('updates metamask state', function () {
const initialState = {
metamask: {
8 years ago
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);
});
});