MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / test_load_many_empty

Function test_load_many_empty

src/query/loader.rs:601–616  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599
600 #[tokio::test]
601 async fn test_load_many_empty() {
602 use sea_orm::{entity::prelude::*, tests_cfg::*, DbBackend, MockDatabase};
603
604 let db = MockDatabase::new(DbBackend::Postgres).into_connection();
605
606 let cakes: Vec<cake::Model> = vec![];
607
608 let fruits = cakes
609 .load_many(fruit::Entity::find(), &db)
610 .await
611 .expect("Should return something");
612
613 let empty_vec: Vec<Vec<fruit::Model>> = vec![];
614
615 assert_eq!(fruits, empty_vec);
616 }
617
618 #[tokio::test]
619 async fn test_load_many_to_many_base() {

Callers

nothing calls this directly

Calls 3

into_connectionMethod · 0.80
load_manyMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected