@@ -6,6 +6,7 @@ import io.github.typesafegithub.workflows.mavenbinding.TextArtifact
66import io.github.typesafegithub.workflows.mavenbinding.VersionArtifacts
77import io.kotest.core.spec.style.FunSpec
88import io.kotest.matchers.shouldBe
9+ import io.ktor.client.HttpClient
910import io.ktor.client.request.get
1011import io.ktor.client.statement.bodyAsText
1112import io.ktor.http.HttpStatusCode
@@ -22,7 +23,7 @@ class ArtifactRoutesTest :
2223 // Given
2324 application {
2425 appModule(
25- buildVersionArtifacts = {
26+ buildVersionArtifacts = { _, _ ->
2627 VersionArtifacts (
2728 files = mapOf (" some-action-v4.pom" to TextArtifact { " Some POM contents" }),
2829 typingActualSource = TypingActualSource .TYPING_CATALOG ,
@@ -48,7 +49,7 @@ class ArtifactRoutesTest :
4849 // Given
4950 application {
5051 appModule(
51- buildVersionArtifacts = { null },
52+ buildVersionArtifacts = { _, _ -> null },
5253 // Irrelevant for these tests.
5354 buildPackageArtifacts = { _, _, _ -> emptyMap() },
5455 getGithubAuthToken = { " " },
@@ -68,7 +69,7 @@ class ArtifactRoutesTest :
6869 // Given
6970 application {
7071 appModule(
71- buildVersionArtifacts = { error(" An internal error occurred!" ) },
72+ buildVersionArtifacts = { _, _ -> error(" An internal error occurred!" ) },
7273 // Irrelevant for these tests.
7374 buildPackageArtifacts = { _, _, _ -> emptyMap() },
7475 getGithubAuthToken = { " " },
@@ -86,8 +87,8 @@ class ArtifactRoutesTest :
8687 test(" when binding generation fails and then succeeds, and two requests are made" ) {
8788 testApplication {
8889 // Given
89- val mockBuildVersionArtifacts = mockk< (ActionCoords ) -> VersionArtifacts ? > ()
90- every { mockBuildVersionArtifacts(any()) } throws
90+ val mockBuildVersionArtifacts = mockk< (ActionCoords , HttpClient ) -> VersionArtifacts ? > ()
91+ every { mockBuildVersionArtifacts(any(), any() ) } throws
9192 Exception (" An internal error occurred!" ) andThen
9293 VersionArtifacts (
9394 files = mapOf (" some-action-v4.pom" to TextArtifact { " Some POM contents" }),
@@ -112,7 +113,7 @@ class ArtifactRoutesTest :
112113 // Then
113114 response2.status shouldBe HttpStatusCode .OK
114115
115- verify(exactly = 2 ) { mockBuildVersionArtifacts(any()) }
116+ verify(exactly = 2 ) { mockBuildVersionArtifacts(any(), any() ) }
116117 }
117118 }
118119 }
0 commit comments