Fix production referral service wiring

Bind the referral route interface to its service and extend the module regression test to cover every route-facing operations boundary.
This commit is contained in:
Rocky
2026-08-16 21:14:50 +08:00
parent c415c53a1c
commit 676bfd2451
2 changed files with 7 additions and 1 deletions
@@ -5,6 +5,8 @@ import com.osglab.account.features.credits.repositories.BillingTransactionRunner
import com.osglab.account.features.credits.repositories.BillingUnitOfWork
import com.osglab.account.features.credits.services.CreditOperations
import com.osglab.account.features.credits.services.CreditService
import com.osglab.account.features.referrals.services.ReferralOperations
import com.osglab.account.features.referrals.services.ReferralService
import io.kotest.matchers.shouldBe
import io.ktor.client.request.get
import io.ktor.http.HttpStatusCode
@@ -27,7 +29,7 @@ class ApplicationTest {
}
@Test
fun `application module exposes credit operations through its interface`() {
fun `application module exposes route services through their interfaces`() {
val transactionRunner = object : BillingTransactionRunner {
override suspend fun <T> inTransaction(block: (BillingUnitOfWork) -> T): T =
error("Transaction runner is not used while resolving dependencies")
@@ -41,6 +43,8 @@ class ApplicationTest {
try {
application.koin.get<CreditOperations>() shouldBe
application.koin.get<CreditService>()
application.koin.get<ReferralOperations>() shouldBe
application.koin.get<ReferralService>()
} finally {
application.close()
}