@@ -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');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user