mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
cleanup
This commit is contained in:
@@ -32,7 +32,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('systemConfig returns key defaults when DB is empty', () {
|
||||
expect(sut.systemConfig.log.level, LogLevel.info);
|
||||
expect(sut.systemConfig.logLevel, LogLevel.info);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ void main() {
|
||||
await sut.write(.themeMode, ThemeMode.light);
|
||||
await sut.write(.logLevel, LogLevel.severe);
|
||||
expect(sut.appConfig.theme.mode, ThemeMode.light);
|
||||
expect(sut.systemConfig.log.level, LogLevel.severe);
|
||||
expect(sut.systemConfig.logLevel, LogLevel.severe);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -63,21 +63,6 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('clearDomain', () {
|
||||
test('clears every key in the domain and leaves other domains alone', () async {
|
||||
await sut.write(.themeMode, ThemeMode.dark);
|
||||
await sut.write(.logLevel, LogLevel.severe);
|
||||
|
||||
await sut.clearDomain(.appConfig);
|
||||
|
||||
expect(sut.appConfig.theme.mode, ThemeMode.system);
|
||||
expect(sut.systemConfig.log.level, LogLevel.severe);
|
||||
|
||||
final remainingKeys = (await ctx.db.select(ctx.db.metadataEntity).get()).map((r) => r.key);
|
||||
expect(remainingKeys, [MetadataKey.logLevel.key]);
|
||||
});
|
||||
});
|
||||
|
||||
group('refresh', () {
|
||||
test('picks up rows that were inserted directly into the DB', () async {
|
||||
await ctx.db
|
||||
@@ -145,7 +130,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('watchSystemConfig emits the new value after a write', () async {
|
||||
final expectation = expectLater(sut.watchSystemConfig().map((c) => c.log.level), emitsThrough(LogLevel.warning));
|
||||
final expectation = expectLater(sut.watchSystemConfig().map((c) => c.logLevel), emitsThrough(LogLevel.warning));
|
||||
await sut.write(MetadataKey.logLevel, LogLevel.warning);
|
||||
await expectation;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user