diff --git a/lib/plugins/aws/package/compile/events/cloudFront/index.test.js b/lib/plugins/aws/package/compile/events/cloudFront/index.test.js index 35b24917aa7d..eeca1242afe7 100644 --- a/lib/plugins/aws/package/compile/events/cloudFront/index.test.js +++ b/lib/plugins/aws/package/compile/events/cloudFront/index.test.js @@ -1693,9 +1693,11 @@ describe('#AwsCompileCloudFrontEvents() package', () => { ], }, }, - }).then(({ awsNaming, cfTemplate }) => { - const edgeResolvedName = awsNaming.getLambdaLogicalId(edgeFunctionName); - expect(cfTemplate.Resources[edgeResolvedName].Properties).not.to.contain.keys('Environment'); + }).then(({ cfTemplate }) => { + const behavior = + cfTemplate.Resources.CloudFrontDistribution.Properties.DistributionConfig + .DefaultCacheBehavior; + expect(behavior).to.contain.keys('AllowedMethods', 'CachedMethods', 'ForwardedValues'); }); });