mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[rust]:putback the app from trash
This commit is contained in:
parent
4966b03123
commit
3387301554
@ -1,5 +1,9 @@
|
||||
use flowy_test::workspace::*;
|
||||
use flowy_workspace::entities::{app::QueryAppRequest, view::*};
|
||||
use flowy_workspace::entities::{
|
||||
app::QueryAppRequest,
|
||||
trash::{TrashIdentifier, TrashType},
|
||||
view::*,
|
||||
};
|
||||
|
||||
#[tokio::test]
|
||||
#[should_panic]
|
||||
@ -12,6 +16,26 @@ async fn app_delete() {
|
||||
let _ = read_app(&test.sdk, query).await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn app_delete_then_putback() {
|
||||
let test = AppTest::new().await;
|
||||
delete_app(&test.sdk, &test.app.id).await;
|
||||
putback_trash(
|
||||
&test.sdk,
|
||||
TrashIdentifier {
|
||||
id: test.app.id.clone(),
|
||||
ty: TrashType::App,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
let query = QueryAppRequest {
|
||||
app_ids: vec![test.app.id.clone()],
|
||||
};
|
||||
let app = read_app(&test.sdk, query).await;
|
||||
assert_eq!(&app, &test.app);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn app_read() {
|
||||
let test = AppTest::new().await;
|
||||
|
Loading…
Reference in New Issue
Block a user