diff --git a/server/test/integration/flows/TagFlow.js b/server/test/integration/flows/TagFlow.js index e2ab069..200254c 100644 --- a/server/test/integration/flows/TagFlow.js +++ b/server/test/integration/flows/TagFlow.js @@ -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); + }); + }); }); \ No newline at end of file