chore: update unit test

This commit is contained in:
appflowy 2022-02-16 14:23:27 +08:00
parent 5a0f87fe02
commit c760ca6788

View File

@ -7,9 +7,16 @@ use flowy_test::{event_builder::*, FlowySDKTest};
async fn workspace_read_all() { async fn workspace_read_all() {
let mut test = FolderTest::new().await; let mut test = FolderTest::new().await;
test.run_scripts(vec![ReadAllWorkspaces]).await; test.run_scripts(vec![ReadAllWorkspaces]).await;
// The first workspace will be the default workspace
// The second workspace will be created by FolderTest if test.all_workspace.len() != 2 {
assert_eq!(test.all_workspace.len(), 2); // The first workspace will be the default workspace
// The second workspace will be created by FolderTest
for workspace in test.all_workspace {
eprintln!("{:?}", workspace.name);
}
assert_eq!(test.all_workspace.len(), 2);
}
let new_name = "My new workspace".to_owned(); let new_name = "My new workspace".to_owned();
test.run_scripts(vec![ test.run_scripts(vec![