File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -177,4 +177,20 @@ contract('VanityURL', function(accounts) {
177
177
assert . isUndefined ( error , "owner should be able to call reserveVanityURLByOwner and assign a vanity to any address" )
178
178
} )
179
179
} ) ;
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
+ } ) ;
180
196
} ) ;
You can’t perform that action at this time.
0 commit comments