Skip to content

Instantly share code, notes, and snippets.

@hgedia
Created July 10, 2019 10:34
Show Gist options
  • Save hgedia/0bd0ccb9546f42705c395fbc92109417 to your computer and use it in GitHub Desktop.
Save hgedia/0bd0ccb9546f42705c395fbc92109417 to your computer and use it in GitHub Desktop.
const Isolated = artifacts.require("Isolated");
// const assert = require("chai").assert;
// const truffleAssert = require('truffle-assertions');
contract('Isolated', (accounts) => {
it('Configuration is setup', async () => {
let contractInstance = await Isolated.deployed();
await contractInstance.updateAdmin(accounts[0]);
// Fetch function works
assert.equal(accounts[0], await contractInstance.fetchAdmin.call(), "Call should work");
// Built-in getter doesn't work
assert.equal(await contractInstance.admin.call(), accounts[0], "Built-in getter will fail ");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment