Created
December 7, 2018 00:57
-
-
Save alant/3132877df9657482c44520d9c8917b45 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var SimpleStorage = artifacts.require("./SimpleStorage.sol"); | |
| contract('SimpleStorage', function(accounts) { | |
| it("...should start with the value 0.", async function() { | |
| let simpleStorage = await SimpleStorage.deployed(); | |
| let storedData = await simpleStorage.storedData_(); | |
| assert.equal(storedData.valueOf(), 0, "0 wasn't stored in contract"); | |
| }); | |
| it("...should store the value 89.", async function() { | |
| let simpleStorage = await SimpleStorage.deployed(); | |
| await simpleStorage.set(89, {from: accounts[0]}); | |
| let storedData = await simpleStorage.storedData_(); | |
| assert.equal(storedData.valueOf(), 89, "89 wasn't stored in contract"); | |
| }); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment