Add serve snapshot test for empty project

This commit is contained in:
Lucien Greathouse
2019-09-03 17:56:23 -07:00
parent d5c816f24d
commit ea765eb929
10 changed files with 176 additions and 213 deletions

View File

@@ -54,7 +54,7 @@ impl ApiService {
/// Get a summary of information about the server
fn handle_api_rojo(&self) -> Response<Body> {
response_json(&ServerInfoResponse {
server_version: SERVER_VERSION,
server_version: SERVER_VERSION.to_owned(),
protocol_version: PROTOCOL_VERSION,
session_id: self.serve_session.session_id(),
expected_place_ids: self.serve_session.serve_place_ids().map(Clone::clone),

View File

@@ -15,9 +15,9 @@ pub const PROTOCOL_VERSION: u64 = 3;
/// Response body from /api/rojo
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerInfoResponse<'a> {
pub struct ServerInfoResponse {
pub session_id: SessionId,
pub server_version: &'a str,
pub server_version: String,
pub protocol_version: u64,
pub expected_place_ids: Option<HashSet<u64>>,
// pub root_instance_id: RbxId,