mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-13 12:06:03 +00:00
29 lines
784 B
Rust
29 lines
784 B
Rust
![]() |
use crate::user::supabase_test::helper::get_supabase_config;
|
||
|
|
||
|
use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
|
||
|
use flowy_user::entities::{AuthTypePB, ThirdPartyAuthPB, UserProfilePB};
|
||
|
|
||
|
use flowy_user::event_map::UserEvent::*;
|
||
|
use std::collections::HashMap;
|
||
|
|
||
|
#[tokio::test]
|
||
|
async fn sign_up_test() {
|
||
|
if get_supabase_config().is_some() {
|
||
|
let test = FlowyCoreTest::new();
|
||
|
let mut map = HashMap::new();
|
||
|
map.insert("uuid".to_string(), uuid::Uuid::new_v4().to_string());
|
||
|
let payload = ThirdPartyAuthPB {
|
||
|
map,
|
||
|
auth_type: AuthTypePB::Supabase,
|
||
|
};
|
||
|
|
||
|
let response = EventBuilder::new(test.clone())
|
||
|
.event(ThirdPartyAuth)
|
||
|
.payload(payload)
|
||
|
.async_send()
|
||
|
.await
|
||
|
.parse::<UserProfilePB>();
|
||
|
dbg!(&response);
|
||
|
}
|
||
|
}
|