From 9d9b2e3ee0c70130109ddfb3bf765bd5ae2948fb Mon Sep 17 00:00:00 2001 From: Sander Vocke Date: Wed, 22 Jul 2020 12:31:17 +0200 Subject: [PATCH] Add tag modification test. --- server/test/integration/flows/TagFlow.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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