From 9123e70434fcd35dcb79a587e6d5c00734cb99e4 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 21 Nov 2016 15:49:03 -0800 Subject: Remove entropy from encryption and project. --- test/unit/idStore-migration-test.js | 2 +- test/unit/idStore-test.js | 3 +-- test/unit/keyring-controller-test.js | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'test/unit') diff --git a/test/unit/idStore-migration-test.js b/test/unit/idStore-migration-test.js index 59801c868..ac8e23d22 100644 --- a/test/unit/idStore-migration-test.js +++ b/test/unit/idStore-migration-test.js @@ -52,7 +52,7 @@ describe('IdentityStore to KeyringController migration', function() { }, }) - idStore._createVault(password, mockVault.seed, null, (err) => { + idStore._createVault(password, mockVault.seed, (err) => { assert.ifError(err, 'createNewVault threw error') originalKeystore = idStore._idmgmt.keyStore diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js index 064483ba0..72ecf34d5 100644 --- a/test/unit/idStore-test.js +++ b/test/unit/idStore-test.js @@ -11,7 +11,6 @@ describe('IdentityStore', function() { describe('#createNewVault', function () { let idStore let password = 'password123' - let entropy = 'entripppppyy duuude' let seedWords let accounts = [] let originalKeystore @@ -26,7 +25,7 @@ describe('IdentityStore', function() { }, }) - idStore.createNewVault(password, entropy, (err, seeds) => { + idStore.createNewVault(password, (err, seeds) => { assert.ifError(err, 'createNewVault threw error') seedWords = seeds originalKeystore = idStore._idmgmt.keyStore diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js index 2527defe3..437441e0e 100644 --- a/test/unit/keyring-controller-test.js +++ b/test/unit/keyring-controller-test.js @@ -12,7 +12,6 @@ describe('KeyringController', function() { let keyringController, state let password = 'password123' - let entropy = 'entripppppyy duuude' let seedWords = 'puzzle seed penalty soldier say clay field arctic metal hen cage runway' let addresses = ['eF35cA8EbB9669A35c31b5F6f249A9941a812AC1'.toLowerCase()] let accounts = [] @@ -33,7 +32,7 @@ describe('KeyringController', function() { // Browser crypto is tested in the integration test suite. keyringController.encryptor = mockEncryptor - keyringController.createNewVaultAndKeychain(password, null, function (err, newState) { + keyringController.createNewVaultAndKeychain(password, function (err, newState) { assert.ifError(err) state = newState done() @@ -51,7 +50,7 @@ describe('KeyringController', function() { it('should set a vault on the configManager', function(done) { keyringController.configManager.setVault(null) assert(!keyringController.configManager.getVault(), 'no previous vault') - keyringController.createNewVaultAndKeychain(password, null, (err, state) => { + keyringController.createNewVaultAndKeychain(password, (err, state) => { assert.ifError(err) const vault = keyringController.configManager.getVault() assert(vault, 'vault created') -- cgit From f5b0795ac5582dd53de728479cf47c43eabfe67c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 21 Nov 2016 16:21:16 -0800 Subject: change all instances of selectedAddress to selectedAccount. --- test/unit/actions/set_selected_account_test.js | 1 - 1 file changed, 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/actions/set_selected_account_test.js b/test/unit/actions/set_selected_account_test.js index 69eb11e47..f72ca82e4 100644 --- a/test/unit/actions/set_selected_account_test.js +++ b/test/unit/actions/set_selected_account_test.js @@ -44,6 +44,5 @@ describe('SHOW_ACCOUNT_DETAIL', function() { var resultingState = reducers(initialState, action) assert.equal(resultingState.metamask.selectedAccount, action.value) - assert.equal(resultingState.metamask.selectedAddress, action.value) }) }) -- cgit From ced36eb20186b0f1bf0c744ac31a5b7804120065 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Nov 2016 19:40:30 -0800 Subject: Improve Keyring organization Separated public & private methods. (Fixes #845) Made class method `type()` into a simple property. (Fixes #846) --- test/unit/keyrings/hd-test.js | 6 +++--- test/unit/keyrings/simple-test.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test/unit') diff --git a/test/unit/keyrings/hd-test.js b/test/unit/keyrings/hd-test.js index c22ffc913..b841cd194 100644 --- a/test/unit/keyrings/hd-test.js +++ b/test/unit/keyrings/hd-test.js @@ -27,9 +27,9 @@ describe('hd-keyring', function() { assert.equal(accounts[1], secondAcct) }) - describe('Keyring.type()', function() { - it('is a class method that returns the type string.', function() { - const type = HdKeyring.type() + describe('Keyring.type', function() { + it('is a class property that returns the type string.', function() { + const type = HdKeyring.type assert.equal(typeof type, 'string') }) }) diff --git a/test/unit/keyrings/simple-test.js b/test/unit/keyrings/simple-test.js index ba000a7a8..96a2fdcf0 100644 --- a/test/unit/keyrings/simple-test.js +++ b/test/unit/keyrings/simple-test.js @@ -13,9 +13,9 @@ describe('simple-keyring', function() { keyring = new SimpleKeyring() }) - describe('Keyring.type()', function() { - it('is a class method that returns the type string.', function() { - const type = SimpleKeyring.type() + describe('Keyring.type', function() { + it('is a class property that returns the type string.', function() { + const type = SimpleKeyring.type assert.equal(type, TYPE_STR) }) }) -- cgit From 60afc41bb65547ace5e3a16b9c743a0dbf36d58a Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Nov 2016 19:47:45 -0800 Subject: Fix keyring test --- test/unit/keyrings/hd-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/keyrings/hd-test.js b/test/unit/keyrings/hd-test.js index b841cd194..bec1a8134 100644 --- a/test/unit/keyrings/hd-test.js +++ b/test/unit/keyrings/hd-test.js @@ -37,7 +37,7 @@ describe('hd-keyring', function() { describe('#type', function() { it('returns the correct value', function() { const type = keyring.type - const correct = HdKeyring.type() + const correct = HdKeyring.type assert.equal(type, correct) }) }) -- cgit From a67b4d7131b05256dbef69fc34cbae3944c1e43e Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 22 Nov 2016 12:54:27 -0800 Subject: Fix etherscan link generation test --- test/unit/account-link-test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/unit') diff --git a/test/unit/account-link-test.js b/test/unit/account-link-test.js index 39889b6be..4ea12e002 100644 --- a/test/unit/account-link-test.js +++ b/test/unit/account-link-test.js @@ -3,9 +3,15 @@ var linkGen = require('../../ui/lib/account-link') describe('account-link', function() { - it('adds testnet prefix to morden test network', function() { + it('adds morden prefix to morden test network', function() { var result = linkGen('account', '2') - assert.notEqual(result.indexOf('testnet'), -1, 'testnet injected') + assert.notEqual(result.indexOf('morden'), -1, 'testnet included') + assert.notEqual(result.indexOf('account'), -1, 'account included') + }) + + it('adds testnet prefix to ropsten test network', function() { + var result = linkGen('account', '3') + assert.notEqual(result.indexOf('testnet'), -1, 'testnet included') assert.notEqual(result.indexOf('account'), -1, 'account included') }) -- cgit