Last active
March 1, 2020 06:20
-
-
Save arkhaminferno/4c6740a1a5f979ff0de6817364ac2a55 to your computer and use it in GitHub Desktop.
This file contains 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
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