test: Clear test database before running test

- Flush the Redis database for a clean test state
This commit is contained in:
Mahmoud-Emad
2025-11-17 15:58:01 +02:00
parent 5559bd4f2f
commit 3a05dc8ae0

View File

@@ -186,6 +186,9 @@ fn test_prd_type_name() ! {
fn test_prd_list() ! {
mut mydb := db.new_test()!
// Clear the test database to ensure clean state
mydb.redis.flushdb()!
mut db_prd := DBPrd{
db: &mydb
}