aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/app
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-10-02 23:45:58 +0800
committerGitHub <noreply@github.com>2018-10-02 23:45:58 +0800
commit8dc8fd09031e1719f2da4e950a08e677d2752f56 (patch)
tree3f14c6f103d14bfd462a4bda977f2e49fffc6ad1 /test/unit/app
parent5fc2c4250b7c8aad24f713e8c31d0fd1f80eeec5 (diff)
parent5539494a5ead91fc4b35654a620ec915ce482f4d (diff)
downloadtangerine-wallet-browser-8dc8fd09031e1719f2da4e950a08e677d2752f56.tar.gz
tangerine-wallet-browser-8dc8fd09031e1719f2da4e950a08e677d2752f56.tar.zst
tangerine-wallet-browser-8dc8fd09031e1719f2da4e950a08e677d2752f56.zip
Merge pull request #5406 from whymarrh/bypass-phishing-warning
Allow users to bypass phishing warning
Diffstat (limited to 'test/unit/app')
-rw-r--r--test/unit/app/controllers/blacklist-controller-test.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/app/controllers/blacklist-controller-test.js b/test/unit/app/controllers/blacklist-controller-test.js
index 085641777..7a14c02cc 100644
--- a/test/unit/app/controllers/blacklist-controller-test.js
+++ b/test/unit/app/controllers/blacklist-controller-test.js
@@ -8,6 +8,16 @@ describe('blacklist controller', function () {
blacklistController = new BlacklistController()
})
+ describe('whitelistDomain', function () {
+ it('should add hostname to the runtime whitelist', function () {
+ blacklistController.whitelistDomain('foo.com')
+ assert.deepEqual(blacklistController.store.getState().whitelist, ['foo.com'])
+
+ blacklistController.whitelistDomain('bar.com')
+ assert.deepEqual(blacklistController.store.getState().whitelist, ['bar.com', 'foo.com'])
+ })
+ })
+
describe('checkForPhishing', function () {
it('should not flag whitelisted values', function () {
const result = blacklistController.checkForPhishing('www.metamask.io')
@@ -37,5 +47,10 @@ describe('blacklist controller', function () {
const result = blacklistController.checkForPhishing('zero-faucet.metamask.io')
assert.equal(result, false)
})
+ it('should not flag whitelisted domain', function () {
+ blacklistController.whitelistDomain('metamask.com')
+ const result = blacklistController.checkForPhishing('metamask.com')
+ assert.equal(result, false)
+ })
})
})