23 lines
568 B
Rust
Raw Normal View History

2021-06-30 23:11:27 +08:00
use super::helper::*;
use flowy_sys::prelude::*;
use flowy_user::prelude::*;
2021-07-02 20:47:52 +08:00
use tokio::time::{sleep, Duration};
2021-06-30 23:11:27 +08:00
#[test]
fn auth_check_no_payload() {
let callback = |_, resp: EventResponse| {
assert_eq!(resp.status, StatusCode::Err);
};
2021-07-02 20:47:52 +08:00
let resp = FlowySDKTester::new(AuthCheck).sync_send();
2021-06-30 23:11:27 +08:00
}
2021-07-02 20:47:52 +08:00
#[tokio::test]
async fn auth_check_with_user_name_email_payload() {
2021-06-30 23:11:27 +08:00
let user_data = UserData::new("jack".to_owned(), "helloworld@gmail.com".to_owned());
FlowySDKTester::new(AuthCheck)
.bytes_payload(user_data)
2021-07-02 20:47:52 +08:00
.sync_send();
2021-06-30 23:11:27 +08:00
}