mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-02-12 07:01:33 +00:00
Test recent gather method
This commit is contained in:
parent
5901266058
commit
afb791600b
1 changed files with 14 additions and 3 deletions
|
@ -47,6 +47,10 @@ var generateCompletedGather = () => {
|
||||||
describe("ArchivedGather", () => {
|
describe("ArchivedGather", () => {
|
||||||
var gather;
|
var gather;
|
||||||
|
|
||||||
|
before(done => helper.clearDb(done));
|
||||||
|
|
||||||
|
afterEach(done => helper.clearDb(done))
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
gather = generateCompletedGather();
|
gather = generateCompletedGather();
|
||||||
});
|
});
|
||||||
|
@ -83,9 +87,16 @@ describe("ArchivedGather", () => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// it ("returns an empty array if no recent gathers", done => {
|
it ("returns an empty array if no recent gathers", done => {
|
||||||
|
helper.clearDb(() => {
|
||||||
// });
|
ArchivedGather.recent((error, gathers) => {
|
||||||
|
if (error) return done(error);
|
||||||
|
assert.isArray(gathers);
|
||||||
|
assert.equal(gathers.length, 0);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
// it ("returns 5 most recent gathers", done => {
|
// it ("returns 5 most recent gathers", done => {
|
||||||
// let lastFive = gathers.slice(Math.max(gathers.length - 5, 1));
|
// let lastFive = gathers.slice(Math.max(gathers.length - 5, 1));
|
||||||
// ArchivedGather.recent((error, results) => {
|
// ArchivedGather.recent((error, results) => {
|
||||||
|
|
Loading…
Reference in a new issue