Skip to content

Commit 4a8e43a

Browse files
committed
more test case
1 parent 0e5a663 commit 4a8e43a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/2_vanity.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,22 @@ contract('VanityURL', function(accounts) {
178178
})
179179
});
180180

181-
it("should error on change vanityURL when not assigned", function() {
181+
it("should error on change vanityURL when address has no vanity", function() {
182182
return vanityInstance.changeVanityURL('noassigned',{from:accounts[5]}).then(function(instance){
183183
assert.isUndefined(instance,"should error on change vanityURL when not assigned")
184184
}).catch(function(error){
185185
assert.isDefined(error,"should error on change vanityURL when not assigned")
186186
})
187187
});
188188

189+
it("should error on change vanityURL when vanity is in use", function() {
190+
return vanityInstance.changeVanityURL('vinay035',{from:accounts[3]}).then(function(instance){
191+
assert.isUndefined(instance,"should error on change vanityURL when not assigned")
192+
}).catch(function(error){
193+
assert.isDefined(error,"should error on change vanityURL when not assigned")
194+
})
195+
});
196+
189197
it("should be able to change vanityURL", function() {
190198
return vanityInstance.changeVanityURL('vinay0351',{from:accounts[3]}).then(function(instance){
191199
assert.isDefined(instance,"should be able to change vanityURL")

0 commit comments

Comments
 (0)