fix: harden school imports and add optional feedback diagnostics
This commit is contained in:
@@ -7,6 +7,17 @@ import 'package:hepan_everyday/domain/app_snapshot.dart';
|
||||
import 'package:hepan_everyday/domain/course.dart';
|
||||
|
||||
void main() {
|
||||
test(
|
||||
'optional exam types reject invalid values even in graduate snapshots',
|
||||
() {
|
||||
final saved = ExamSchedule(
|
||||
semesterLabel: '2026秋',
|
||||
termId: '73',
|
||||
records: [const ExamRecord(code: 'A', name: '课程', examTypeId: 99)],
|
||||
).toJson();
|
||||
expect(() => ExamSchedule.fromJson(saved), throwsFormatException);
|
||||
},
|
||||
);
|
||||
test(
|
||||
'managed undergraduate identifiers cannot lose their school or term',
|
||||
() {
|
||||
|
||||
Reference in New Issue
Block a user