Added begin_development and begin_test
Added status (changed completed field) fixed internet status connection.
This commit is contained in:
@@ -39,9 +39,9 @@ var ProjectSchema = new mongoose.Schema({
|
|||||||
priority: {
|
priority: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
completed: {
|
status: {
|
||||||
type: Boolean,
|
type: Number,
|
||||||
default: false
|
default: 0
|
||||||
},
|
},
|
||||||
created_at: {
|
created_at: {
|
||||||
type: Date
|
type: Date
|
||||||
@@ -68,6 +68,18 @@ var ProjectSchema = new mongoose.Schema({
|
|||||||
modified: {
|
modified: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
},
|
},
|
||||||
|
live_url: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
test_url: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
begin_development: {
|
||||||
|
type: Date,
|
||||||
|
},
|
||||||
|
begin_test: {
|
||||||
|
type: Date,
|
||||||
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ var TodoSchema = new mongoose.Schema({
|
|||||||
priority: {
|
priority: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
completed: {
|
status: {
|
||||||
type: Boolean,
|
type: Number,
|
||||||
default: false
|
default: 0
|
||||||
},
|
},
|
||||||
created_at: {
|
created_at: {
|
||||||
type: Date
|
type: Date
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const userjson = JSON.stringify(users[0]);
|
|||||||
const todos = [{
|
const todos = [{
|
||||||
_id: new ObjectID(),
|
_id: new ObjectID(),
|
||||||
category: "personal",
|
category: "personal",
|
||||||
completed: false,
|
status: 0,
|
||||||
completed_at: new Date(),
|
completed_at: new Date(),
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
descr: "Primo Task Esempio",
|
descr: "Primo Task Esempio",
|
||||||
@@ -91,7 +91,7 @@ const todos = [{
|
|||||||
}, {
|
}, {
|
||||||
_id: new ObjectID(),
|
_id: new ObjectID(),
|
||||||
category: "personal",
|
category: "personal",
|
||||||
completed: false,
|
status: 0,
|
||||||
completed_at: new Date(),
|
completed_at: new Date(),
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
descr: "Secondo Task Esempio",
|
descr: "Secondo Task Esempio",
|
||||||
@@ -107,7 +107,7 @@ const todos = [{
|
|||||||
}, {
|
}, {
|
||||||
_id: new ObjectID(),
|
_id: new ObjectID(),
|
||||||
category: "personal",
|
category: "personal",
|
||||||
completed: false,
|
status: 0,
|
||||||
completed_at: new Date(),
|
completed_at: new Date(),
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
descr: "Terzo Task Esempio",
|
descr: "Terzo Task Esempio",
|
||||||
@@ -123,7 +123,7 @@ const todos = [{
|
|||||||
}, { // RECORD CHE VERRA' UTILIZZATO PER AGGIUNGERE UN NUOVO TASK
|
}, { // RECORD CHE VERRA' UTILIZZATO PER AGGIUNGERE UN NUOVO TASK
|
||||||
_id: new ObjectID(),
|
_id: new ObjectID(),
|
||||||
category: "personal",
|
category: "personal",
|
||||||
completed: false,
|
status: 0,
|
||||||
completed_at: new Date(),
|
completed_at: new Date(),
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
descr: "Nuovo Quarto Task Esempio da Inserire",
|
descr: "Nuovo Quarto Task Esempio da Inserire",
|
||||||
|
|||||||
@@ -393,13 +393,13 @@ if (testsingolo) {
|
|||||||
.patch(`/todos/${hexId}`)
|
.patch(`/todos/${hexId}`)
|
||||||
.set('x-auth', users[0].tokens[0].token)
|
.set('x-auth', users[0].tokens[0].token)
|
||||||
.send({
|
.send({
|
||||||
completed: true,
|
status: 1,
|
||||||
descr
|
descr
|
||||||
})
|
})
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect((res) => {
|
.expect((res) => {
|
||||||
expect(res.body.todo.descr).toBe(descr);
|
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');
|
// expect(res.body.todo.completedAt).toBeA('number');
|
||||||
})
|
})
|
||||||
.end(done);
|
.end(done);
|
||||||
@@ -413,7 +413,7 @@ if (testsingolo) {
|
|||||||
.patch(`/todos/${hexId}`)
|
.patch(`/todos/${hexId}`)
|
||||||
.set('x-auth', users[1].tokens[0].token)
|
.set('x-auth', users[1].tokens[0].token)
|
||||||
.send({
|
.send({
|
||||||
completed: true,
|
status: 1,
|
||||||
descr
|
descr
|
||||||
})
|
})
|
||||||
.expect(404)
|
.expect(404)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
allfieldTodo: function () {
|
allfieldTodo: function () {
|
||||||
return ['userId', 'pos', 'category', 'descr', 'priority', 'completed', 'created_at', 'modify_at',
|
return ['userId', 'pos', 'category', 'descr', 'priority', 'status', 'created_at', 'modify_at',
|
||||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progress', 'modified']
|
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progress', 'modified']
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ module.exports = {
|
|||||||
|
|
||||||
// #TODO Projects++ Add fields ...
|
// #TODO Projects++ Add fields ...
|
||||||
allfieldProject: function () {
|
allfieldProject: function () {
|
||||||
return ['userId', 'pos', 'id_parent', 'descr', 'longdescr', 'hoursplanned', 'hoursworked', 'priority', 'completed', 'created_at', 'modify_at',
|
return ['userId', 'pos', 'id_parent', 'descr', 'longdescr', 'hoursplanned', 'hoursworked', 'priority', 'status', 'created_at', 'modify_at',
|
||||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progressCalc', 'modified']
|
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progressCalc', 'modified', 'live_url', 'test_url', 'begin_development', 'begin_test']
|
||||||
},
|
},
|
||||||
|
|
||||||
allfieldProjectWithId: function () {
|
allfieldProjectWithId: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user