앱 단위·화면·통합 테스트
This commit is contained in:
@@ -37,6 +37,27 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
test('회원가입 모드 성공만 가입 완료 화면 플래그를 세우고, 시작하면 내린다', () async {
|
||||
const account = AuthAccount(uid: 'new', provider: SocialProvider.google);
|
||||
final auth = AuthRepository(
|
||||
providers: [
|
||||
_FakeProvider(
|
||||
SocialProvider.google,
|
||||
result: const AuthSucceeded(account),
|
||||
),
|
||||
],
|
||||
releaseMode: true,
|
||||
);
|
||||
await auth.signIn(SocialProvider.google);
|
||||
expect(auth.justSignedUp, isFalse);
|
||||
await auth.signOut();
|
||||
await auth.signIn(SocialProvider.google, signUp: true);
|
||||
expect(auth.justSignedUp, isTrue);
|
||||
auth.finishSignup();
|
||||
expect(auth.justSignedUp, isFalse);
|
||||
auth.dispose();
|
||||
});
|
||||
|
||||
test('4개 provider의 취소는 실패 안내나 로그인 상태를 만들지 않는다', () async {
|
||||
for (final provider in SocialProvider.values) {
|
||||
final auth = AuthRepository(
|
||||
|
||||
Reference in New Issue
Block a user