added guardian letters with chat and multiple answer functionalities
This commit is contained in:
@@ -29,9 +29,15 @@ void main() {
|
||||
|
||||
final effective = AppModule.effectiveModuleOrder(settingsWith(custom));
|
||||
|
||||
// parentLetters and ticker are both missing and follow timetable in the
|
||||
// declared order, so they line up behind it.
|
||||
expect(
|
||||
effective.indexOf(Modules.parentLetters),
|
||||
effective.indexOf(Modules.timetable) + 1,
|
||||
);
|
||||
expect(
|
||||
effective.indexOf(Modules.ticker),
|
||||
effective.indexOf(Modules.timetable) + 1,
|
||||
effective.indexOf(Modules.parentLetters) + 1,
|
||||
);
|
||||
expect(effective.toSet(), Modules.values.toSet());
|
||||
});
|
||||
@@ -94,10 +100,11 @@ void main() {
|
||||
final student = CredentialSession(username: 'max', password: 'pw');
|
||||
const guardian = GuardianSession(email: 'e@x.de');
|
||||
|
||||
test('password accounts see every module', () {
|
||||
for (final m in Modules.values) {
|
||||
expect(AppModule.isAvailableFor(m, student), isTrue, reason: m.name);
|
||||
}
|
||||
test('password accounts see every module but the guardian ones', () {
|
||||
final hidden = Modules.values
|
||||
.where((m) => !AppModule.isAvailableFor(m, student))
|
||||
.toSet();
|
||||
expect(hidden, {Modules.parentLetters});
|
||||
});
|
||||
|
||||
test('guardians lose exactly the Nextcloud modules', () {
|
||||
|
||||
Reference in New Issue
Block a user