Added begin_development and begin_test
Added status (changed completed field) fixed internet status connection.
This commit is contained in:
@@ -75,7 +75,7 @@ const userjson = JSON.stringify(users[0]);
|
||||
const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Primo Task Esempio",
|
||||
@@ -91,7 +91,7 @@ const todos = [{
|
||||
}, {
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Secondo Task Esempio",
|
||||
@@ -107,7 +107,7 @@ const todos = [{
|
||||
}, {
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Terzo Task Esempio",
|
||||
@@ -123,7 +123,7 @@ const todos = [{
|
||||
}, { // RECORD CHE VERRA' UTILIZZATO PER AGGIUNGERE UN NUOVO TASK
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Nuovo Quarto Task Esempio da Inserire",
|
||||
|
||||
@@ -393,13 +393,13 @@ if (testsingolo) {
|
||||
.patch(`/todos/${hexId}`)
|
||||
.set('x-auth', users[0].tokens[0].token)
|
||||
.send({
|
||||
completed: true,
|
||||
status: 1,
|
||||
descr
|
||||
})
|
||||
.expect(200)
|
||||
.expect((res) => {
|
||||
expect(res.body.todo.descr).toBe(descr);
|
||||
expect(res.body.todo.completed).toBe(true);
|
||||
expect(res.body.todo.status).toBe(1);
|
||||
// expect(res.body.todo.completedAt).toBeA('number');
|
||||
})
|
||||
.end(done);
|
||||
@@ -413,7 +413,7 @@ if (testsingolo) {
|
||||
.patch(`/todos/${hexId}`)
|
||||
.set('x-auth', users[1].tokens[0].token)
|
||||
.send({
|
||||
completed: true,
|
||||
status: 1,
|
||||
descr
|
||||
})
|
||||
.expect(404)
|
||||
|
||||
Reference in New Issue
Block a user