Skip to content

Commit

Permalink
Merge branch 'TestsRevisited' into TestsRevisitedFix
Browse files Browse the repository at this point in the history
  • Loading branch information
BicaniWolfie authored Dec 6, 2023
2 parents 1dec9b5 + ae7c4b6 commit f5b5f62
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions test/blocs/weekplans_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,13 @@ void main() {
when(() => weekApi.get(
'test', weekNameModel5.weekYear!, weekNameModel5.weekNumber!))
.thenAnswer((_) => rx_dart.BehaviorSubject<WeekModel>.seeded(weekModel5));

when(() => weekApi.get(
'test', weekNameModel6.weekYear!, weekNameModel6.weekNumber!))
.thenAnswer((_) => rx_dart.BehaviorSubject<WeekModel>.seeded(weekModel6));

when(() => weekApi.delete(any(), any(), any()))
.thenAnswer((_) => rx_dart.BehaviorSubject<bool>.seeded(true));

when(() => weekApi.delete(any(), any(), any()))
.thenAnswer((_) => rx_dart.BehaviorSubject<bool>.seeded(true));

test('Should be able to load weekplans for a user', async((DoneFn done) {
when(() => weekApi.get(
mockUser.id!, weekNameModel1.weekYear!, weekNameModel1.weekNumber!))
.thenAnswer(
(_) => rx_dart.BehaviorSubject<WeekModel>.seeded(weekModel1));

when(() => weekApi.getNames(mockUser.id!)).thenAnswer((_) =>
rx_dart.BehaviorSubject<List<WeekNameModel>>.seeded(weekNameModelList));

// Checks if the loaded weekNameModels are not null and are equal to the
// expected weekName model list
bloc.weekNameModels.listen((List<WeekNameModel>? response) {
Expand Down

0 comments on commit f5b5f62

Please sign in to comment.