mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
test /read API for empty project
This commit is contained in:
parent
565bed2b9d
commit
9af6c9cfd9
3 changed files with 23 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ use std::path::PathBuf;
|
|||
use librojo::{
|
||||
session::Session,
|
||||
project::Project,
|
||||
web::{Server, WebConfig, ServerInfoResponse, ReadAllResponse},
|
||||
web::{Server, WebConfig, ServerInfoResponse, ReadResponse, ReadAllResponse},
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
|
@ -48,4 +48,13 @@ fn empty() {
|
|||
assert_eq!(response.message_cursor, -1);
|
||||
assert_eq!(response.instances.as_ref(), &HashMap::new());
|
||||
}
|
||||
|
||||
{
|
||||
let body = server.get_string("/api/read/0");
|
||||
let response = serde_json::from_str::<ReadResponse>(&body).unwrap();
|
||||
|
||||
assert_eq!(response.server_id, "0");
|
||||
assert_eq!(response.message_cursor, -1);
|
||||
assert_eq!(response.instances, HashMap::new());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue