aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-08-25 04:28:24 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-08-25 04:28:24 +0800
commit061fec1849fdb527512b0b7f23d675ba4a7e812d (patch)
treef3f959a0b799d862a8d17383eae0f08ebb884cd5 /test
parentd3d634d09c0c51ade2d750ee2d7f036f797757b0 (diff)
downloadtangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.tar
tangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.tar.gz
tangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.tar.bz2
tangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.tar.lz
tangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.tar.xz
tangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.tar.zst
tangerine-wallet-browser-061fec1849fdb527512b0b7f23d675ba4a7e812d.zip
Now calls API functions with mock options.
Diffstat (limited to 'test')
-rw-r--r--test/unit/config-manager-test.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js
index eaa5376fd..d4fd1d661 100644
--- a/test/unit/config-manager-test.js
+++ b/test/unit/config-manager-test.js
@@ -1,4 +1,4 @@
-var assert = require('assert')
+const assert = require('assert')
const extend = require('xtend')
const STORAGE_KEY = 'metamask-persistance-key'
var configManagerGen = require('../lib/mock-config-manager')
@@ -47,11 +47,12 @@ describe('config-manager', function() {
describe('#updateConversionRate', function() {
it('should retrieve an update for ETH to USD and set it in memory', function(done) {
this.timeout(15000)
+
assert.equal(configManager.getConversionRate(), false)
var promise = new Promise(
function (resolve, reject) {
configManager.setCurrentFiat('USD')
- configManager.updateConversionRate().then(function() {
+ configManager.updateConversionRate(true, 'USD').then(function() {
resolve()
})
})
@@ -69,10 +70,11 @@ describe('config-manager', function() {
it('should work for JPY as well.', function() {
this.timeout(15000)
assert.equal(configManager.getConversionRate(), false)
+
var promise = new Promise(
function (resolve, reject) {
configManager.setCurrentFiat('JPY')
- configManager.updateConversionRate().then(function() {
+ configManager.updateConversionRate(true, 'JPY').then(function() {
resolve()
})
})