diff options
| author | Dan Finlay <dan@danfinlay.com> | 2018-01-09 07:16:08 +0800 | 
|---|---|---|
| committer | Dan Finlay <dan@danfinlay.com> | 2018-01-09 07:16:08 +0800 | 
| commit | 943befef91cd725579c4bf4e7024734f02ef98f5 (patch) | |
| tree | 38602c7e5f7c2ea0b32fd9bc04ff321b786ead71 | |
| parent | 0275231e13d49a9b71b85af389d2a9850229eacb (diff) | |
| download | tangerine-wallet-browser-943befef91cd725579c4bf4e7024734f02ef98f5.tar.gz tangerine-wallet-browser-943befef91cd725579c4bf4e7024734f02ef98f5.tar.zst tangerine-wallet-browser-943befef91cd725579c4bf4e7024734f02ef98f5.zip | |
Add test for gas estimate default
| -rw-r--r-- | test/unit/metamask-controller-test.js | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/test/unit/metamask-controller-test.js b/test/unit/metamask-controller-test.js index 9ec7cd0af..3fc7f9a98 100644 --- a/test/unit/metamask-controller-test.js +++ b/test/unit/metamask-controller-test.js @@ -72,6 +72,25 @@ describe('MetaMaskController', function () {          metamaskController.recentBlocksController = realRecentBlocksController        }) + +      it('gives the 1 gwei price if no blocks have been seen.', async function () { +        const realRecentBlocksController = metamaskController.recentBlocksController +        metamaskController.recentBlocksController = { +          store: { +            getState: () => { +              return { +                recentBlocks: [] +              } +            } +          } +        } + +        const gasPrice = metamaskController.getGasPrice() +        assert.equal(gasPrice, '0x' + GWEI_BN.toString(16), 'defaults to 1 gwei') + +        metamaskController.recentBlocksController = realRecentBlocksController +      }) +      })      describe('#createNewVaultAndKeychain', function () { | 
