fix(auth): 미사용 인증 의존성과 경로를 제거한다

This commit is contained in:
2026-10-13 18:35:21 +09:00
parent fef491ea93
commit 8830f364f5
7 changed files with 24 additions and 119 deletions
@@ -78,6 +78,28 @@ class MainV2LoginGuardSourceTest {
}
}
@Test
fun `마이 페이지와 오디오 상세 생성 경로는 미사용 인증 의존성을 갖지 않는다`() {
val legacyAuth = Regex("\\b(AuthApi|AuthRepository|AuthVerifyRequest|authVerify)\\b")
listOf(
"mypage/MyPageViewModel.kt",
"audio_content/detail/AudioContentDetailViewModel.kt",
"di/AppDI.kt"
).forEach { path ->
val source = projectFile("app/src/main/java/kr/co/vividnext/sodalive/$path").readText()
assertFalse(path, legacyAuth.containsMatchIn(source))
}
}
@Test
fun `미사용 인증 전용 파일은 제거하고 공용 응답은 유지한다`() {
val authDirectory = projectFile("app/src/main/java/kr/co/vividnext/sodalive/mypage/auth")
listOf("AuthApi.kt", "AuthRepository.kt", "AuthVerifyRequest.kt").forEach { name ->
assertFalse(name, File(authDirectory, name).exists())
}
assertTrue(File(authDirectory, "AuthResponse.kt").isFile)
}
private fun projectFile(relativePath: String): File {
val candidates = listOf(File(relativePath), File("../$relativePath"))
return candidates.firstOrNull { it.exists() }