Commit 61970dd1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Add a duplicate media unit test

parent d0640747
......@@ -78,8 +78,6 @@ bool Label::createTable(sqlite3* dbConnection)
return SqliteTools::executeRequest( dbConnection, req.c_str() );
}
const std::string&policy::LabelCachePolicy::key( const std::shared_ptr<ILabel> self )
{
return self->name();
......
......@@ -67,3 +67,15 @@ TEST_F( Files, Delete )
f2 = ml->file( "/dev/loutre" );
ASSERT_EQ( f2, nullptr );
}
TEST_F( Files, Duplicate )
{
auto f = ml->addFile( "/dev/moulaf" );
auto f2 = ml->addFile( "/dev/moulaf" );
ASSERT_NE( f, nullptr );
ASSERT_EQ( f2, nullptr );
f2 = ml->file( "/dev/moulaf" );
ASSERT_EQ( f, f2 );
}
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