feat(authentication): remove session wrapper for AuthenticationSession

This commit is contained in:
2023-04-13 23:24:12 +02:00
parent 6556c4485f
commit b83275aaf6
32 changed files with 319 additions and 262 deletions
@@ -43,13 +43,24 @@ void main() {
when(() => authenticationRepository.sessionStream()).thenAnswer(
(_) => Stream.fromIterable([
SessionWrapper<int>(
event: SignedInFromCacheEvent(account: account),
session: Session<int>(account: account, data: 10),
AuthenticationSession.fromEvent(
SignedInFromCacheEvent(account: account),
data: 10,
)
]),
);
when(
() => authenticationRepository.currentSession(),
).thenAnswer(
(_) async => Ok(
AuthenticationSession.fromEvent(
SignedInFromCacheEvent(account: account),
data: 10,
),
),
);
when(
() => authenticationRepository.refresh(),
).thenAnswer((_) async => Ok(account));