1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

fix: make sure test-data is urlsafe

This commit is contained in:
Christopher Kolstad 2021-02-23 13:53:09 +01:00 committed by Ivar Conradi Østhus
parent 44af41547e
commit 7be884637f
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09

View File

@ -339,14 +339,17 @@ test.serial(
test.serial('can untag feature', async t => { test.serial('can untag feature', async t => {
t.plan(1); t.plan(1);
const request = await setupApp(stores); const request = await setupApp(stores);
const feature1Name = faker.helpers.slugify(faker.lorem.words(3)); const feature1Name = faker.lorem.slug(3);
await request.post('/api/admin/features').send({ await request.post('/api/admin/features').send({
name: feature1Name, name: feature1Name,
type: 'killswitch', type: 'killswitch',
enabled: true, enabled: true,
strategies: [{ name: 'default' }], strategies: [{ name: 'default' }],
}); });
const tag = { value: faker.lorem.word(), type: 'simple' }; const tag = {
value: faker.lorem.slug(1),
type: 'simple',
};
await request await request
.post(`/api/admin/features/${feature1Name}/tags`) .post(`/api/admin/features/${feature1Name}/tags`)
.send(tag) .send(tag)