|
|
|
@ -60,4 +60,18 @@ describe('POST /tag with a parent', () => { |
|
|
|
|
.then(done); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('PUT /tag with a new parent', () => { |
|
|
|
|
it('should succeed', done => { |
|
|
|
|
init().then((app) => { |
|
|
|
|
var req = chai.request(app).keepOpen(); |
|
|
|
|
helpers.createTag(req, { name: "Tag1" }, 200, { id: 1 }) |
|
|
|
|
.then(() => helpers.createTag(req, { name: "Tag2" }, 200, { id: 2 }) ) |
|
|
|
|
.then(() => helpers.modifyTag(req, 2, { parentId: 1 }, 200) ) |
|
|
|
|
.then(() => helpers.checkTag(req, 2, 200, { name: "Tag2", parentId: 1 })) |
|
|
|
|
.then(req.close) |
|
|
|
|
.then(done); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |