mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-05 23:49:53 +08:00
test: 测试是否成功 join 表
This commit is contained in:
@@ -190,3 +190,22 @@ pub async fn unhandled_videos_pages(
|
|||||||
.all(connection)
|
.all(connection)
|
||||||
.await?)
|
.await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod test {
|
||||||
|
use entity::{page, video};
|
||||||
|
use sea_orm::{ColumnTrait, EntityTrait, QueryFilter};
|
||||||
|
|
||||||
|
#[ignore = "just for manual test"]
|
||||||
|
#[tokio::test]
|
||||||
|
async fn test_join() {
|
||||||
|
let video_with_pages: Vec<(video::Model, Vec<page::Model>)> = video::Entity::find()
|
||||||
|
.filter(video::Column::Handled.eq(false))
|
||||||
|
.filter(video::Column::SinglePage.eq(false))
|
||||||
|
.find_with_related(page::Entity)
|
||||||
|
.all(&crate::database::database_connection().await.unwrap())
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
dbg!(video_with_pages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user