style(api): merge use decl; assert status + breathing room in authority test
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -235,6 +235,7 @@ async fn create_and_list_authorities_by_kind(pool: PgPool) {
|
||||
|
||||
let json: serde_json::Value =
|
||||
serde_json::from_slice(&list.into_body().collect().await.unwrap().to_bytes()).unwrap();
|
||||
|
||||
assert_eq!(json.as_array().unwrap().len(), 1);
|
||||
assert_eq!(json[0]["kind"], "person");
|
||||
|
||||
@@ -250,9 +251,11 @@ async fn create_and_list_authorities_by_kind(pool: PgPool) {
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(places.status(), StatusCode::OK);
|
||||
|
||||
let places_json: serde_json::Value =
|
||||
serde_json::from_slice(&places.into_body().collect().await.unwrap().to_bytes()).unwrap();
|
||||
|
||||
assert!(places_json.as_array().unwrap().is_empty());
|
||||
|
||||
// bad kind → 422
|
||||
|
||||
Reference in New Issue
Block a user