aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-04-23 04:32:56 +0800
committerDan Finlay <dan@danfinlay.com>2016-04-23 04:32:56 +0800
commit875a0731ddab06f9db2bd5bc67471f897ef99c3d (patch)
tree72d912242a2bdb1dd8c8a7550dff0bce120d1c1a /test
parentdb85827b2be19d7bfc7dfaeec4786c4d051b6629 (diff)
downloadtangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.tar
tangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.tar.gz
tangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.tar.bz2
tangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.tar.lz
tangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.tar.xz
tangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.tar.zst
tangerine-wallet-browser-875a0731ddab06f9db2bd5bc67471f897ef99c3d.zip
Deprecate rawtestrpc.metamask.io
This migration will move users who have their clients configured to point at `rawtestrpc.metamask.io` to point at our new test-net RPC, `testrpc.metamask.io`.
Diffstat (limited to 'test')
-rw-r--r--test/unit/migrations-test.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/unit/migrations-test.js b/test/unit/migrations-test.js
index 092c0eccd..4170b8e62 100644
--- a/test/unit/migrations-test.js
+++ b/test/unit/migrations-test.js
@@ -3,13 +3,21 @@ var path = require('path')
var wallet1 = require(path.join('..', 'lib', 'migrations', '001.json'))
var migration2 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '002'))
+var migration3 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '003'))
describe('wallet1 is migrated successfully', function() {
it('should convert etherscan provider', function(done) {
- var result = migration2.migrate(wallet1.data)
- assert.equal(result.config.provider.type, 'rpc', 'provider should be rpc')
- assert.equal(result.config.provider.rpcTarget, 'https://rpc.metamask.io/', 'provider should be our rpc')
+
+ var firstResult = migration2.migrate(wallet1.data)
+ assert.equal(firstResult.config.provider.type, 'rpc', 'provider should be rpc')
+ assert.equal(firstResult.config.provider.rpcTarget, 'https://rpc.metamask.io/', 'provider should be our rpc')
+
+ var oldTestRpc = 'https://rawtestrpc.metamask.io/'
+ firstResult.config.provider.rpcTarget = oldTestRpc
+ var secondResult = migration3.migrate(firstResult)
+ assert.equal(firstResult.config.provider.rpcTarget, 'https://testrpc.metamask.io/', 'provider should be our rpc')
+
done()
})
})