Add tag modification test.

pull/7/head
Sander Vocke 5 years ago
parent 77a116938c
commit 9d9b2e3ee0
  1. 14
      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);
});
});
});
Loading…
Cancel
Save