mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[rust]: fix backend test issues
This commit is contained in:
parent
f35b756459
commit
1c7f3e9681
@ -102,7 +102,7 @@ backend = { path = ".", features = ["flowy_test"]}
|
||||
flowy-user = { path = "../rust-lib/flowy-user", features = ["http_server"] }
|
||||
flowy-workspace = { path = "../rust-lib/flowy-workspace", default-features = false, features = ["http_server", "backend_service"] }
|
||||
flowy-ws = { path = "../rust-lib/flowy-ws" }
|
||||
flowy-sdk = { path = "../rust-lib/flowy-sdk" }
|
||||
flowy-sdk = { path = "../rust-lib/flowy-sdk", features = ["http_server"] }
|
||||
flowy-test = { path = "../rust-lib/flowy-test" }
|
||||
flowy-infra = { path = "../rust-lib/flowy-infra" }
|
||||
flowy-ot = { path = "../rust-lib/flowy-ot" }
|
||||
|
@ -25,7 +25,7 @@ pub async fn create_default_workspace(
|
||||
async fn create_workspace(transaction: &mut DBTransaction<'_>, user_id: &str) -> Result<Workspace, ServerError> {
|
||||
let (sql, args, workspace) = WorkspaceBuilder::new(user_id.as_ref())
|
||||
.name("DefaultWorkspace")
|
||||
.desc("Workspace created by AppFlowy")
|
||||
.desc("")
|
||||
.build()?;
|
||||
|
||||
let _ = sqlx::query_with(&sql, args)
|
||||
|
@ -35,6 +35,7 @@ async fn user_sign_in() {
|
||||
let params = SignInParams {
|
||||
email: email.to_string(),
|
||||
password: password.to_string(),
|
||||
name: "rust".to_string(),
|
||||
};
|
||||
let _ = app.sign_in(params).await.unwrap();
|
||||
}
|
||||
@ -70,6 +71,7 @@ async fn user_update_password() {
|
||||
let sign_in_params = SignInParams {
|
||||
email: email.to_string(),
|
||||
password: password.to_string(),
|
||||
name: "rust".to_string(),
|
||||
};
|
||||
|
||||
match server.sign_in(sign_in_params).await {
|
||||
|
@ -16,7 +16,8 @@ async fn workspace_create() {
|
||||
async fn workspace_read() {
|
||||
let test = WorkspaceTest::new().await;
|
||||
let read_params = QueryWorkspaceParams::new().workspace_id(&test.workspace.id);
|
||||
tracing::info!("{:?}", test.server.read_workspaces(read_params).await);
|
||||
let repeated_workspace = test.server.read_workspaces(read_params).await;
|
||||
tracing::info!("{:?}", repeated_workspace);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
@ -126,6 +126,7 @@ fn sign_in(dispatch: Arc<EventDispatch>) -> UserProfile {
|
||||
let payload = SignInRequest {
|
||||
email: login_email(),
|
||||
password: login_password(),
|
||||
name: "rust".to_owned(),
|
||||
}
|
||||
.into_bytes()
|
||||
.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user