File tree Expand file tree Collapse file tree
Application/DevLogPresentation/Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ struct LoginFeatureTests {
2727 #expect( spy. calledProviders == [ . github] )
2828 }
2929
30- @Test ( " 로그인 요청 중에는 로딩 상태가 켜지고 요청이 끝나면 꺼진다 " )
31- func 로그인_요청_중에는_로딩_상태가_켜지고_요청이_끝나면_꺼진다 ( ) async {
30+ @Test ( " 로그인 성공 후에도 메인 화면 전환 전까지 로딩 상태를 유지한다 " )
31+ func 로그인_성공_후에도_메인_화면_전환_전까지_로딩_상태를_유지한다 ( ) async {
3232 let spy = SignInUseCaseSpy ( )
3333 spy. shouldSuspend = true
3434 let driver = LoginTestDriver ( useCase: spy)
@@ -44,10 +44,10 @@ struct LoginFeatureTests {
4444 spy. resume ( )
4545
4646 await waitUntil {
47- !driver . isLoading
47+ spy . successfulProviders == [ . google ]
4848 }
4949
50- #expect( ! driver. isLoading)
50+ #expect( driver. isLoading)
5151 }
5252
5353 @Test ( " 로그인 실패 후에도 로딩 상태가 꺼진다 " )
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ final class SignInUseCaseSpy: SignInUseCase {
5454 var error : Error ?
5555 var shouldSuspend = false
5656 private( set) var calledProviders : [ AuthProvider ] = [ ]
57+ private( set) var successfulProviders = [ AuthProvider] ( )
5758 private var continuation : CheckedContinuation < Void , Never > ?
5859 private var shouldResume = false
5960
@@ -74,6 +75,8 @@ final class SignInUseCaseSpy: SignInUseCase {
7475 if let error {
7576 throw error
7677 }
78+
79+ successfulProviders. append ( provider)
7780 }
7881
7982 func resume( ) {
You can’t perform that action at this time.
0 commit comments