Skip to content

Commit

Permalink
add create token test
Browse files Browse the repository at this point in the history
  • Loading branch information
arseneeth committed Apr 30, 2020
1 parent 208877c commit ba7aa86
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"openzeppelin-solidity": "^2.5.0"
},
"dependencies": {
"truffle-assertions": "^0.9.2",
"web3": "^1.2.7"
}
}
14 changes: 12 additions & 2 deletions test/TokenFactory.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
const TokenFactory = artifacts.require("TokenFactory");

const truffleAssert = require('truffle-assertions');

contract("TokenFactory test", async accounts => {
it("should pass", async () => {
let factory;

beforeEach('innit contracts for each test', async function () {

factory = await TokenFactory.deployed();

})

it("should create a token", async () => {

let instance = await TokenFactory.deployed();
truffleAssert.passes(factory.createToken("logic", "TestDataToken", "TDT", accounts[0]));

});

Expand Down

0 comments on commit ba7aa86

Please sign in to comment.