chorus/tests/auth.rs

22 lines
603 B
Rust
Raw Normal View History

2023-06-25 11:33:50 +02:00
use chorus::types::RegisterSchema;
2023-11-20 14:03:06 +01:00
// PRETTYFYME: Move common wasm setup to common.rs
#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::*;
#[cfg(target_arch = "wasm32")]
wasm_bindgen_test_configure!(run_in_browser);
2023-05-27 22:46:50 +02:00
mod common;
2023-05-27 22:46:50 +02:00
#[tokio::test]
async fn test_registration() {
2023-09-01 15:02:44 +02:00
let bundle = common::setup().await;
2023-06-25 11:33:50 +02:00
let reg = RegisterSchema {
username: "Hiiii".into(),
2023-06-19 10:27:32 +02:00
date_of_birth: Some("2000-01-01".to_string()),
2023-06-25 11:33:50 +02:00
consent: true,
..Default::default()
};
2023-09-01 15:02:44 +02:00
bundle.instance.clone().register_account(reg).await.unwrap();
2023-05-27 22:46:50 +02:00
common::teardown(bundle).await;
}