Skip to content

Commit eb39a21

Browse files
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.
1 parent 6b4d9d0 commit eb39a21

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/e2e/api/admin/tags.e2e.test.ts

+7
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,10 @@ test('Can bulk remove tags', async () => {
209209
})
210210
.expect(200);
211211
});
212+
213+
test('backward compatibility: the API should return invalid tag names if they exist', async () => {
214+
const tag = { value: ' ', type: 'simple' };
215+
await db.stores.tagStore.createTag(tag);
216+
const { body } = await app.request.get('/api/admin/tags').expect(200);
217+
expect(body.tags).toContainEqual(tag);
218+
});

0 commit comments

Comments
 (0)