diff --git a/lib/services/addon-service.test.js b/lib/services/addon-service.test.js index c741be5850..67c5881934 100644 --- a/lib/services/addon-service.test.js +++ b/lib/services/addon-service.test.js @@ -362,3 +362,22 @@ test('should reject updating addon config with missing required parameter', asyn { instanceOf: ValidationError }, ); }); + +test('Should reject addon config if a required parameter is just the empty string', async t => { + const { addonService } = getSetup(); + + const config = { + provider: 'simple', + enabled: true, + parameters: { + url: '', + var: 'some-value', + }, + events: [FEATURE_CREATED], + }; + + await t.throwsAsync( + async () => addonService.createAddon(config, 'me@mail.com'), + { instanceOf: ValidationError }, + ); +});