Skip to content

Instantly share code, notes, and snippets.

@arkhaminferno
Last active March 1, 2020 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arkhaminferno/4c6740a1a5f979ff0de6817364ac2a55 to your computer and use it in GitHub Desktop.
Save arkhaminferno/4c6740a1a5f979ff0de6817364ac2a55 to your computer and use it in GitHub Desktop.
const assert = require('assert');
const TournamentContract = artifacts.require('./TournamentContract.sol');
before(async() =>{
tournament = await TournamentContract.deployed();
});
describe("Testing Create Tournament function", () => {
it("should return true after tournaments being created.", (instance) => {
instance.createTournament( 'The very first Tournament', 'Type 1',[4,1],0 );
return instance.createTournament(0);
}).then(function(res){
assert.equal(res[1].toString(),"The very first Tournament");
assert.equal(res[2].toString(),"Type 1");
assert.equal(res[3],[4,1]);
assert.equal(res[4].toNumber(),5);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment