修复单元测试
Some checks failed
Dart CI / build (push) Failing after 8s

This commit is contained in:
2026-04-04 14:38:49 +08:00
parent baefafeff7
commit dd6577ce3a
3 changed files with 31 additions and 31 deletions

View File

@@ -63,14 +63,14 @@ void main() {
expect(albums.first.name, 'vacation');
});
test('should generate consistent id from directory name', () async {
test('should generate consistent id from directory path', () async {
await Directory(p.join(tempDir.path, 'test_album')).create();
final albums1 = await repository.getAllAlbums();
final albums2 = await repository.getAllAlbums();
expect(albums1.first.id, albums2.first.id);
expect(albums1.first.id, 'test_album'.hashCode);
expect(albums1.first.id, p.join(tempDir.path, 'test_album').hashCode);
});
test('should set createdAt and updatedAt from directory stat', () async {
@@ -135,4 +135,4 @@ void main() {
expect(album!.name, 'beta');
});
});
}
}