workspace_test.rs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. use crate::client_folder::script::FolderNodePadScript::*;
  2. use crate::client_folder::script::FolderNodePadTest;
  3. use flowy_sync::client_folder::FolderNodePad;
  4. #[test]
  5. fn client_folder_create_app_test() {
  6. let mut test = FolderNodePadTest::new();
  7. test.run_scripts(vec![
  8. CreateApp {
  9. id: "1".to_string(),
  10. name: "my first app".to_string(),
  11. },
  12. AssertAppContent {
  13. id: "1".to_string(),
  14. name: "my first app".to_string(),
  15. },
  16. ]);
  17. }
  18. #[test]
  19. fn client_folder_delete_app_test() {
  20. let mut test = FolderNodePadTest::new();
  21. test.run_scripts(vec![
  22. CreateApp {
  23. id: "1".to_string(),
  24. name: "my first app".to_string(),
  25. },
  26. DeleteApp { id: "1".to_string() },
  27. AssertApp {
  28. id: "1".to_string(),
  29. expected: None,
  30. },
  31. ]);
  32. }
  33. #[test]
  34. fn client_folder_update_app_test() {
  35. let mut test = FolderNodePadTest::new();
  36. test.run_scripts(vec![
  37. CreateApp {
  38. id: "1".to_string(),
  39. name: "my first app".to_string(),
  40. },
  41. UpdateApp {
  42. id: "1".to_string(),
  43. name: "TODO".to_string(),
  44. },
  45. AssertAppContent {
  46. id: "1".to_string(),
  47. name: "TODO".to_string(),
  48. },
  49. ]);
  50. }