Groundwork spec for gatherers

This commit is contained in:
Chris Blanchard 2015-10-03 17:40:11 +01:00
parent 592e742299
commit c11b94f9c7

38
spec/gatherer.js Normal file
View file

@ -0,0 +1,38 @@
"use strict";
var helper = require("./helpers/index.js");
var User = helper.User;
var Gather = helper.Gather;
var Gatherer = helper.Gatherer;
var assert = require("chai").assert;
describe("Gather Model:", function () {
var user, gatherer;
beforeEach(function () {
user = helper.createUser();
gatherer = new Gatherer(user);
});
describe("#voteRegather", function () {
it ("marks gatherer as voting for regather", function () {
assert.isFalse(gatherer.regatherVote);
gatherer.voteRegather();
assert.isTrue(gatherer.regatherVote);
});
it ("assigns vote for regather", function () {
gatherer.voteRegather(true);
assert.isTrue(gatherer.regatherVote);
gatherer.voteRegather(false);
assert.isFalse(gatherer.regatherVote);
});
});
describe("#voteForMap", function () {
});
describe("#voteForLeader", function () {
});
});