From 09925cff5aae567fc4958e219e867b47e5e528bd Mon Sep 17 00:00:00 2001
From: Kyle Drake <kyle@kyledrake.net>
Date: Thu, 6 Mar 2014 17:27:40 -0600
Subject: [PATCH] cleanup throw tests, add case for bad input

---
 test/address.js | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/test/address.js b/test/address.js
index 9dc50bc..3b33f7d 100644
--- a/test/address.js
+++ b/test/address.js
@@ -31,13 +31,9 @@ describe('Address', function() {
       })
 
       it('throws error for invalid or unrecognized input', function() {
-        var addr =
-        assert.throws(
-          function() {
-            new Address('beepboopbeepboopbeepboopbeepboopbeepboopbeep')
-          },
-          Error
-        )
+        assert.throws(function() {
+          new Address('beepboopbeepboopbeepboopbeepboopbeepboopbeep')
+        }, Error)
       })
 
       it('works for byte input', function() {
@@ -51,6 +47,12 @@ describe('Address', function() {
         assert.equal(addr.hash, hash)
         assert.equal(network.testnet.addressVersion, hash.version)
       })
+      
+      it('fails for bad input', function() {
+        assert.throws(function() {
+          new Address('foo')
+        }, Error)
+      })
     })
 
     describe('getVersion', function() {