Skip to content

Instantly share code, notes, and snippets.

@CinnamonGrrrl
Created March 27, 2018 14:57
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 CinnamonGrrrl/32e676652c6c6ba7ec1c86e1eac126ff to your computer and use it in GitHub Desktop.
Save CinnamonGrrrl/32e676652c6c6ba7ec1c86e1eac126ff to your computer and use it in GitHub Desktop.
const { increaseTime } = require("./utils");
const DAY = 3600 * 24;
contract("Funding", accounts => {
[...]
let funding;
beforeEach(async () => {
funding = await Funding.new(DAY);
});
it("finishes fundraising when time is up", async () => {
assert.equal(await funding.isFinished.call(), false);
await increaseTime(DAY);
assert.equal(await funding.isFinished.call(), true);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment