mirror of
https://github.com/strapi/strapi.git
synced 2026-01-06 12:13:52 +00:00
Add e2e test for unpublish
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
parent
36668fa173
commit
0c37f64182
@ -351,6 +351,29 @@ describe('Content Manager End to End', () => {
|
||||
expect(body.message).toBe('Already published');
|
||||
});
|
||||
|
||||
test('Unpublish article1, expect article1 to be set to null', async () => {
|
||||
const entry = _.clone(data.articles[0]);
|
||||
|
||||
let { body } = await rq({
|
||||
url: `/content-manager/explorer/application::article.article/unpublish/${entry.id}`,
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
expect(body.published_at).toBeNull();
|
||||
});
|
||||
|
||||
test('Unpublish article1, expect article1 to already be a draft', async () => {
|
||||
const entry = _.clone(data.articles[0]);
|
||||
|
||||
let { body } = await rq({
|
||||
url: `/content-manager/explorer/application::article.article/unpublish/${entry.id}`,
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
expect(body.statusCode).toBe(400);
|
||||
expect(body.message).toBe('Already a draft');
|
||||
});
|
||||
|
||||
test('Delete all articles should remove the association in each tags related to them', async () => {
|
||||
const { body: createdTag } = await rq({
|
||||
url: '/content-manager/explorer/application::tag.tag',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user