Skip to content

Commit 0e5a663

Browse files
committed
vanityURL change test case
1 parent 4825f74 commit 0e5a663

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/2_vanity.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,20 @@ contract('VanityURL', function(accounts) {
177177
assert.isUndefined(error,"owner should be able to call reserveVanityURLByOwner and assign a vanity to any address")
178178
})
179179
});
180+
181+
it("should error on change vanityURL when not assigned", function() {
182+
return vanityInstance.changeVanityURL('noassigned',{from:accounts[5]}).then(function(instance){
183+
assert.isUndefined(instance,"should error on change vanityURL when not assigned")
184+
}).catch(function(error){
185+
assert.isDefined(error,"should error on change vanityURL when not assigned")
186+
})
187+
});
188+
189+
it("should be able to change vanityURL", function() {
190+
return vanityInstance.changeVanityURL('vinay0351',{from:accounts[3]}).then(function(instance){
191+
assert.isDefined(instance,"should be able to change vanityURL")
192+
}).catch(function(error){
193+
assert.isUndefined(error,"should be able to change vanityURL")
194+
})
195+
});
180196
});

0 commit comments

Comments
 (0)