Skip to content

Commit bbfabff

Browse files
author
Per Kops
committed
test: fix unit-tests for OpenApiPathItemExtensions
1 parent a4cfffc commit bbfabff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public void ExtractApiPathAuthorization(
108108
},
109109
};
110110

111+
if (expectedUseAllowAnonymous is null)
112+
{
113+
apiPath.Extensions.Remove(SecurityExtensionNameConstants.AuthenticationRequired);
114+
apiPath.Operations.Values.First().Extensions.Remove(SecurityExtensionNameConstants.AuthenticationRequired);
115+
}
116+
111117
// Act
112118
var result = apiPath.ExtractApiPathAuthorization();
113119

0 commit comments

Comments
 (0)