Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/lib/blocs/homework/homework_dialog_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class HomeworkDialogBloc extends BlocBase with HomeworkValidators {

final c = Course.create().copyWith(
subject: homework.subject,
name: homework.subject,
name: homework.courseName,
sharecode: "000000",
abbreviation: homework.subjectAbbreviation,
id: homework.courseReference!.id,
Expand Down
11 changes: 2 additions & 9 deletions app/test/homework/homework_dialog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,7 @@ void main() {

expect(userInput.title, 'New title text');
expect(userInput.course!.id, 'foo_course');
// The following TestFailure was thrown running a test:
// Expected: 'Foo course'
// Actual: 'Foo subject'
// Which: is different.
// Expected: Foo course
// Actual: Foo subject
// ^
// expect(userInput.course!.name, 'Foo course');
expect(userInput.course!.name, 'Foo course');
expect(userInput.course!.subject, 'Foo subject');
// The following TestFailure was thrown running a test:
// Expected: 'F'
Expand Down Expand Up @@ -379,7 +372,7 @@ void main() {
await pumpAndSettleHomeworkDialog(tester);

expect(find.text('title text', findRichText: true), findsOneWidget);
expect(find.text('Foo subject'), findsOneWidget);
expect(find.text('Foo course'), findsOneWidget);
// Not found, idk why:
// expect(find.text('12. März 2024'), findsOneWidget);
expect(find.text('Mit Abgabe'), findsOneWidget);
Expand Down

0 comments on commit b9b8b6c

Please sign in to comment.