Commit 20c6f150 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

tests: Folders deletion: Add extra checks

Ensure the files aren't cached anymore, and that the folder is indeed
deleted.
parent 2dbb5190
......@@ -42,13 +42,30 @@ TEST_F( Folders, Delete )
auto f = ml->addFolder( "." );
ASSERT_NE( f, nullptr );
auto folderPath = f->path();
auto files = ml->files();
ASSERT_EQ( files.size(), 2u );
auto filePath = files[0]->mrl();
ml->deleteFolder( f );
f = ml->folder( folderPath );
ASSERT_EQ( nullptr, f );
files = ml->files();
ASSERT_EQ( files.size(), 0u );
// Check the file isn't cached anymore:
auto file = ml->file( filePath );
ASSERT_EQ( nullptr, file );
SetUp();
// Recheck folder deletion from DB:
f = ml->folder( folderPath );
ASSERT_EQ( nullptr, f );
}
TEST_F( Folders, Load )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment