import { FtrProviderContext } from '../../../../common/ftr_provider_context' ; export default function emailTest ( { getService } ) { const supertest = getService ( 'supertest' ) ; describe ( 'create email action' , ( ) => { it ( 'should return 403 when creating an email action' , async ( ) => { await supertest . post ( '/api/actions/action' ) . set ( 'kbn-xsrf' , 'foo' ) . send ( { name : 'An email action' , actionTypeId : '.email' , config : { service : '__json' , from : 'bob@example.com' , } , secrets : { user : 'bob' , password : 'supersecret' , } , } ) . expect ( 403 , { statusCode : 403 , error : 'Forbidden' , message : 'Action type .email is disabled because your basic license does not support it. Please upgrade your license.' , } ) ; } ) ; } ) ; }