mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Wrangle lifetimes and implement empty read_all test
This commit is contained in:
parent
27d5bd3d6f
commit
c85e5c8a78
3 changed files with 29 additions and 19 deletions
|
|
@ -13,7 +13,7 @@ use std::path::PathBuf;
|
|||
use librojo::{
|
||||
session::Session,
|
||||
project::Project,
|
||||
web::{Server, WebConfig, ServerInfoResponse},
|
||||
web::{Server, WebConfig, ServerInfoResponse, ReadAllResponse},
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
|
@ -39,4 +39,13 @@ fn empty() {
|
|||
assert_eq!(response.protocol_version, 2);
|
||||
assert_eq!(response.partitions, HashMap::new());
|
||||
}
|
||||
|
||||
{
|
||||
let body = server.get_string("/api/read_all");
|
||||
let response = serde_json::from_str::<ReadAllResponse>(&body).unwrap();
|
||||
|
||||
assert_eq!(response.server_id, "0");
|
||||
assert_eq!(response.message_cursor, -1);
|
||||
assert_eq!(response.instances.as_ref(), &HashMap::new());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue