From a522fe0a3b48a9fa2efe25bdcb576fe25b554aed Mon Sep 17 00:00:00 2001 From: AlexanderManich Date: Tue, 28 Nov 2023 12:40:04 +0100 Subject: [PATCH] test fix --- src/tests/database/access_context.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tests/database/access_context.rs b/src/tests/database/access_context.rs index c425844..23b6e17 100644 --- a/src/tests/database/access_context.rs +++ b/src/tests/database/access_context.rs @@ -351,12 +351,15 @@ mod database_tests { async fn get_by_uid_and_model_id_test() { let (access_context, expected_access, user, model) = seed_db().await; + access::Entity::insert(expected_access.clone().into_active_model()) + .exec(&access_context.db_context.get_connection()) + .await + .unwrap(); + let access = access_context .get_access_by_uid_and_model_id(user.id, model.id) .await; - dbg!(&expected_access, &access, user, model); - assert!(access.unwrap().unwrap() == expected_access); } }