mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add test case for PreferencesController#setAccountLabel
This commit is contained in:
parent
c54e4c7191
commit
50af02e74b
@ -52,6 +52,27 @@ describe('preferences controller', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('setAccountLabel', function () {
|
||||||
|
it('should update a label for the given account', function () {
|
||||||
|
preferencesController.setAddresses([
|
||||||
|
'0xda22le',
|
||||||
|
'0x7e57e2',
|
||||||
|
])
|
||||||
|
|
||||||
|
assert.deepEqual(preferencesController.store.getState().identities['0xda22le'], {
|
||||||
|
name: 'Account 1',
|
||||||
|
address: '0xda22le',
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
preferencesController.setAccountLabel('0xda22le', 'Dazzle')
|
||||||
|
assert.deepEqual(preferencesController.store.getState().identities['0xda22le'], {
|
||||||
|
name: 'Dazzle',
|
||||||
|
address: '0xda22le',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('getTokens', function () {
|
describe('getTokens', function () {
|
||||||
it('should return an empty list initially', async function () {
|
it('should return an empty list initially', async function () {
|
||||||
await preferencesController.setSelectedAddress('0x7e57e2')
|
await preferencesController.setSelectedAddress('0x7e57e2')
|
||||||
|
Loading…
Reference in New Issue
Block a user