aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/nameForAccount_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/nameForAccount_test.js')
-rw-r--r--test/unit/nameForAccount_test.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/test/unit/nameForAccount_test.js b/test/unit/nameForAccount_test.js
deleted file mode 100644
index 9bb02c6bc..000000000
--- a/test/unit/nameForAccount_test.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var assert = require('assert')
-var sinon = require('sinon')
-
-var path = require('path')
-var contractNamer = require(path.join(__dirname, '..', '..', 'old-ui', 'lib', 'contract-namer.js'))
-
-describe('contractNamer', function () {
- beforeEach(function () {
- this.sinon = sinon.createSandbox()
- })
-
- afterEach(function () {
- this.sinon.restore()
- })
-
- describe('naming a contract', function () {
- it('should return nothing for an unknown random account', function () {
- const input = '0x2386F26FC10000'
- const output = contractNamer(input)
- assert.deepEqual(output, null)
- })
-
- it('should accept identities as an optional second parameter', function () {
- const input = '0x2386F26FC10000'.toLowerCase()
- const expected = 'bar'
- const identities = {}
- identities[input] = { name: expected }
- const output = contractNamer(input, identities)
- assert.deepEqual(output, expected)
- })
-
- it('should check for identities case insensitively', function () {
- const input = '0x2386F26FC10000'.toLowerCase()
- const expected = 'bar'
- const identities = {}
- identities[input] = { name: expected }
- const output = contractNamer(input.toUpperCase(), identities)
- assert.deepEqual(output, expected)
- })
- })
-})