build: add server-rs check scripts
This commit is contained in:
@@ -99,8 +99,14 @@ mod tests {
|
||||
|
||||
assert_eq!(body["ok"], Value::Bool(true));
|
||||
assert_eq!(body["data"]["ok"], Value::String("value".to_string()));
|
||||
assert_eq!(body["meta"]["requestId"], Value::String("req-test".to_string()));
|
||||
assert_eq!(body["meta"]["routeVersion"], Value::String(API_VERSION.to_string()));
|
||||
assert_eq!(
|
||||
body["meta"]["requestId"],
|
||||
Value::String("req-test".to_string())
|
||||
);
|
||||
assert_eq!(
|
||||
body["meta"]["routeVersion"],
|
||||
Value::String(API_VERSION.to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -122,8 +128,14 @@ mod tests {
|
||||
};
|
||||
let body = json_error_body(Some(&request_context), &error).0;
|
||||
|
||||
assert_eq!(body["error"]["code"], Value::String("NOT_FOUND".to_string()));
|
||||
assert_eq!(body["meta"]["requestId"], Value::String("req-test".to_string()));
|
||||
assert_eq!(
|
||||
body["error"]["code"],
|
||||
Value::String("NOT_FOUND".to_string())
|
||||
);
|
||||
assert_eq!(
|
||||
body["meta"]["requestId"],
|
||||
Value::String("req-test".to_string())
|
||||
);
|
||||
assert!(body.get("ok").is_none());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user