Created
December 27, 2020 21:13
-
-
Save reime005/37eafb234e1477c94f7672b80fd56c75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should allow changing the accounts personal names', async function() { | |
const instance = await NameStorageExample.deployed(); | |
// change the name related to the sender's address | |
const tx1 = await instance.changeAddressName("rick", {from: accounts[0]}); | |
const tx2 = await instance.changeAddressName("morty", {from: accounts[1]}); | |
// check if the name related to the address has been changed | |
const personalNameAccount0 = await instance.addressNames(accounts[0]) | |
const personalNameAccount1 = await instance.addressNames(accounts[1]) | |
assert.strictEqual("rick", personalNameAccount0, | |
"personal name did not change"); | |
assert.strictEqual("morty", personalNameAccount1, | |
"personal name did not change"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment