nixin-farm/nixin_farm/tests/tasks/seed.rs

18 lines
376 B
Rust
Raw Normal View History

2024-10-16 18:03:38 +00:00
use loco_rs::{boot::run_task, task, testing};
use nixin_farm::app::App;
use serial_test::serial;
#[tokio::test]
#[serial]
async fn test_can_seed_data() {
let boot = testing::boot_test::<App>().await.unwrap();
assert!(run_task::<App>(
&boot.app_context,
Some(&"seed_data".to_string()),
&task::Vars::default()
)
.await
.is_ok());
}