From bbfabff3a003056f90a56344da338885fb8f9e14 Mon Sep 17 00:00:00 2001 From: Per Kops Date: Thu, 22 Aug 2024 18:15:58 +0200 Subject: [PATCH] test: fix unit-tests for OpenApiPathItemExtensions --- .../Extensions/OpenApiPathItemExtensionsTests.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs b/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs index bd8a8318..70ee1290 100644 --- a/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs +++ b/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs @@ -108,6 +108,12 @@ public void ExtractApiPathAuthorization( }, }; + if (expectedUseAllowAnonymous is null) + { + apiPath.Extensions.Remove(SecurityExtensionNameConstants.AuthenticationRequired); + apiPath.Operations.Values.First().Extensions.Remove(SecurityExtensionNameConstants.AuthenticationRequired); + } + // Act var result = apiPath.ExtractApiPathAuthorization();