From f51500ec78bedc9db1fe8cde382180ef172dbad8 Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Mon, 4 Feb 2019 14:04:58 +0100 Subject: [PATCH] fix: override field changed name to contextName --- lib/routes/admin-api/feature-schema.js | 2 +- lib/routes/admin-api/feature-schema.test.js | 2 +- test/e2e/api/admin/feature.e2e.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/admin-api/feature-schema.js b/lib/routes/admin-api/feature-schema.js index 17b8f6f112..d3f445589b 100644 --- a/lib/routes/admin-api/feature-schema.js +++ b/lib/routes/admin-api/feature-schema.js @@ -28,7 +28,7 @@ const variantsSchema = joi.object().keys({ joi .object() .keys({ - field: joi.string().required(), + contextName: joi.string().required(), values: joi.array().items(joi.string()), }) .optional() diff --git a/lib/routes/admin-api/feature-schema.test.js b/lib/routes/admin-api/feature-schema.test.js index b3a9249ff6..6fedc516ef 100644 --- a/lib/routes/admin-api/feature-schema.test.js +++ b/lib/routes/admin-api/feature-schema.test.js @@ -56,7 +56,7 @@ test('should be possible to define variant overrides', t => { weight: 1, overrides: [ { - field: 'userId', + contextName: 'userId', values: ['123'], }, ], diff --git a/test/e2e/api/admin/feature.e2e.test.js b/test/e2e/api/admin/feature.e2e.test.js index f646ef422b..a7ea8903cf 100644 --- a/test/e2e/api/admin/feature.e2e.test.js +++ b/test/e2e/api/admin/feature.e2e.test.js @@ -250,7 +250,7 @@ test.serial('creates new feature toggle with variant overrides', async t => { weight: 50, overrides: [ { - field: 'userId', + contextName: 'userId', values: ['123'], }, ],