Made some small optims when checking if files are removed
This commit is contained in:
@@ -85,6 +85,24 @@ namespace lms::db::tests
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DatabaseFixture, PlayListFile_findAbsoluteFilePath)
|
||||
{
|
||||
ScopedPlayListFile playlist{ session, "/tmp/foo.m3u" };
|
||||
|
||||
{
|
||||
auto transaction{ session.createReadTransaction() };
|
||||
|
||||
PlayListFileId lastRetrievedId;
|
||||
std::filesystem::path retrievedFilePath;
|
||||
PlayListFile::findAbsoluteFilePath(session, lastRetrievedId, 1, [&](PlayListFileId playListFileId, const std::filesystem::path& filePath) {
|
||||
EXPECT_EQ(playListFileId, playlist.getId());
|
||||
retrievedFilePath = filePath;
|
||||
});
|
||||
|
||||
EXPECT_EQ(retrievedFilePath, "/tmp/foo.m3u");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DatabaseFixture, PlayListFile_deleteTrackList)
|
||||
{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user