mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-15 23:32:46 +00:00
fix(server): update aggregate billing test
This commit is contained in:
parent
9ca0113f66
commit
6f5da61497
1 changed files with 3 additions and 3 deletions
|
|
@ -5870,13 +5870,13 @@ mod tests {
|
|||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn get_aggregate_usage_returns_zeros_initially() {
|
||||
async fn get_aggregate_billing_returns_zeros_initially() {
|
||||
let state = create_app_state();
|
||||
let app = build_router(Arc::clone(&state), AuthMode::Disabled);
|
||||
|
||||
let req = Request::builder()
|
||||
.method("GET")
|
||||
.uri(api("/usage"))
|
||||
.uri(api("/billing"))
|
||||
.body(Body::empty())
|
||||
.unwrap();
|
||||
|
||||
|
|
@ -5887,8 +5887,8 @@ mod tests {
|
|||
assert_eq!(body["totals"]["runs"].as_i64().unwrap(), 0);
|
||||
assert_eq!(body["totals"]["input_tokens"].as_i64().unwrap(), 0);
|
||||
assert_eq!(body["totals"]["output_tokens"].as_i64().unwrap(), 0);
|
||||
assert_eq!(body["totals"]["cost"].as_f64().unwrap(), 0.0);
|
||||
assert_eq!(body["totals"]["runtime_secs"].as_f64().unwrap(), 0.0);
|
||||
assert!(body["totals"]["total_usd_micros"].is_null());
|
||||
assert!(body["by_model"].as_array().unwrap().is_empty());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue