init commit

This commit is contained in:
2024-10-30 02:02:12 +01:00
commit ea4942bda1
93 changed files with 9909 additions and 0 deletions

1
tests/tasks/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod seed;

17
tests/tasks/seed.rs Normal file
View File

@@ -0,0 +1,17 @@
use loco_rs::{boot::run_task, task, testing};
use gabrielkaszewski_rs::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());
}