mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
27 lines
646 B
Rust
27 lines
646 B
Rust
use super::helper::*;
|
|
use flowy_sys::prelude::*;
|
|
use flowy_user::prelude::*;
|
|
|
|
#[test]
|
|
fn auth_check_no_payload() {
|
|
let callback = |_, resp: EventResponse| {
|
|
assert_eq!(resp.status, StatusCode::Err);
|
|
};
|
|
|
|
FlowySDKTester::new(AuthCheck).callback(callback).run();
|
|
}
|
|
|
|
#[test]
|
|
fn auth_check_with_user_name_email_payload() {
|
|
let callback = |_, resp: EventResponse| {
|
|
assert_eq!(resp.status, StatusCode::Ok);
|
|
};
|
|
|
|
let user_data = UserData::new("jack".to_owned(), "helloworld@gmail.com".to_owned());
|
|
|
|
FlowySDKTester::new(AuthCheck)
|
|
.bytes_payload(user_data)
|
|
.callback(callback)
|
|
.run();
|
|
}
|