simplestorage.js 523 B

1234567891011121314151617
  1. var SimpleStorage = artifacts.require("./SimpleStorage.sol");
  2. contract('SimpleStorage', function(accounts) {
  3. it("...should store the value 89.", function() {
  4. return SimpleStorage.deployed().then(function(instance) {
  5. simpleStorageInstance = instance;
  6. return simpleStorageInstance.set(89, {from: accounts[0]});
  7. }).then(function() {
  8. return simpleStorageInstance.get.call();
  9. }).then(function(storedData) {
  10. assert.equal(storedData, 89, "The value 89 was not stored.");
  11. });
  12. });
  13. });