mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-06 01:15:28 +02:00
chore: test that the tags API still returns tags that you can't create anymore (#7304)
This change adds a test to the tags API to ensure that even if you can't create tags that are pure whitespace anymore, you'll still receive pre-existing tags from the API that fit this description. The test is here to ensure that we don't break this in future versions of Unleash.
This commit is contained in:
parent
6b4d9d0c1d
commit
eb39a212ce
@ -209,3 +209,10 @@ test('Can bulk remove tags', async () => {
|
|||||||
})
|
})
|
||||||
.expect(200);
|
.expect(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('backward compatibility: the API should return invalid tag names if they exist', async () => {
|
||||||
|
const tag = { value: ' ', type: 'simple' };
|
||||||
|
await db.stores.tagStore.createTag(tag);
|
||||||
|
const { body } = await app.request.get('/api/admin/tags').expect(200);
|
||||||
|
expect(body.tags).toContainEqual(tag);
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user