aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-11-21 06:15:00 +0800
committerDan Finlay <dan@danfinlay.com>2017-11-21 06:15:00 +0800
commit884f2035648a8ab7ddbde9f911ed608670912752 (patch)
tree3c7a5d579b7156e5eb485e5dfb7347b4ca93e1cc /test
parent408bbe726f60c96d3fd2d8132900b822a1ca9fb6 (diff)
downloadtangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.tar
tangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.tar.gz
tangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.tar.bz2
tangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.tar.lz
tangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.tar.xz
tangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.tar.zst
tangerine-wallet-browser-884f2035648a8ab7ddbde9f911ed608670912752.zip
Add failing test for #2577 Seed Phrase Bug
Diffstat (limited to 'test')
-rw-r--r--test/unit/metamask-controller-test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/unit/metamask-controller-test.js b/test/unit/metamask-controller-test.js
index ef6cae758..548b5f87f 100644
--- a/test/unit/metamask-controller-test.js
+++ b/test/unit/metamask-controller-test.js
@@ -27,6 +27,24 @@ describe('MetaMaskController', function () {
describe('Metamask Controller', function () {
assert(metamaskController)
+
+ describe('#createNewVaultAndKeychain', function () {
+ it('can only create new vault on keyringController once', async function () {
+
+ const selectStub = sinon.stub(metamaskController, 'selectFirstIdentity')
+
+ const expectation = sinon.mock(metamaskController.keyringController)
+ .expects('createNewVaultAndKeychain').once()
+
+ const password = 'a-fake-password'
+
+ const first = await metamaskController.createNewVaultAndKeychain(password)
+ const second = await metamaskController.createNewVaultAndKeychain(password)
+
+ expectation.verify()
+ selectStub.reset()
+ })
+ })
})
})