change tasks routes to /tasks/(user|challenge)

This commit is contained in:
Matteo Pagliazzi
2016-01-06 18:40:11 +01:00
parent 2b2dcfe7ce
commit 8ba486ec12
13 changed files with 248 additions and 158 deletions

View File

@@ -16,7 +16,7 @@ describe('DELETE /tasks/:id', () => {
let task;
beforeEach(() => {
return user.post('/tasks?tasksOwner=user', {
return user.post('/tasks/user', {
text: 'test habit',
type: 'habit',
}).then((createdTask) => {
@@ -48,7 +48,7 @@ describe('DELETE /tasks/:id', () => {
it('cannot delete a task owned by someone else', () => {
return generateUser()
.then((anotherUser) => {
return anotherUser.post('/tasks?tasksOwner=user', {
return anotherUser.post('/tasks/user', {
text: 'test habit',
type: 'habit',
});