Add and adjust tests for new register behavior.

This commit is contained in:
Blade Barringer
2015-11-04 17:40:49 -06:00
parent 8618716ca4
commit 797287a75c
2 changed files with 113 additions and 3 deletions

View File

@@ -8,7 +8,14 @@ describe('GET /user/tasks/', () => {
let api, user;
beforeEach(() => {
return generateUser().then((_user) => {
return generateUser({
dailys: [
{text: 'daily', type: 'daily'},
{text: 'daily', type: 'daily'},
{text: 'daily', type: 'daily'},
{text: 'daily', type: 'daily'},
],
}).then((_user) => {
user = _user;
api = requester(user);
});
@@ -17,7 +24,7 @@ describe('GET /user/tasks/', () => {
it('gets all tasks', () => {
return api.get(`/user/tasks/`).then((tasks) => {
expect(tasks).to.be.an('array');
expect(tasks.length).to.be.greaterThan(4);
expect(tasks.length).to.be.greaterThan(3);
let task = tasks[0];
expect(task.id).to.exist;