Skip to content

Commit d0bdea8

Browse files
committed
Fix CI
1 parent f8ccefe commit d0bdea8

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tests/active_enum_tests.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -696,17 +696,19 @@ pub async fn find_linked_active_enum(db: &DatabaseConnection) -> Result<(), DbEr
696696
async fn delete_active_enum(db: &DatabaseConnection) -> Result<(), DbErr> {
697697
use active_enum_child::*;
698698

699-
let model = Entity::find().one(db).await?.unwrap();
699+
if db.get_database_backend().support_returning() {
700+
let model = Entity::find().one(db).await?.unwrap();
700701

701-
assert_eq!(model.id, 1);
702+
assert_eq!(model.id, 1);
702703

703-
assert_eq!(
704-
model,
705-
Entity::delete(model.clone().into_active_model())
706-
.exec_with_returning(db)
707-
.await?
708-
.unwrap()
709-
);
704+
assert_eq!(
705+
model,
706+
Entity::delete(model.clone().into_active_model())
707+
.exec_with_returning(db)
708+
.await?
709+
.unwrap()
710+
);
711+
}
710712

711713
Ok(())
712714
}

0 commit comments

Comments
 (0)