mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-01-19 16:11:01 +00:00
Groundwork spec for gatherers
This commit is contained in:
parent
592e742299
commit
c11b94f9c7
1 changed files with 38 additions and 0 deletions
38
spec/gatherer.js
Normal file
38
spec/gatherer.js
Normal 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 () {
|
||||
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue