fix(picloud): use is_some_and in /auth/me test (clippy)
clippy::map_unwrap_or — drop the map().unwrap_or(false) for the flatter is_some_and(Value::is_null). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,7 +108,7 @@ async fn auth_me_returns_principal_with_role_and_email(pool: PgPool) {
|
||||
assert_eq!(body["instance_role"], "owner");
|
||||
// Seeded admin has no email — must round-trip as null, not be missing.
|
||||
assert!(
|
||||
body.get("email").map(Value::is_null).unwrap_or(false),
|
||||
body.get("email").is_some_and(Value::is_null),
|
||||
"email should be present and null, got: {body}"
|
||||
);
|
||||
assert!(body["id"].as_str().is_some());
|
||||
|
||||
Reference in New Issue
Block a user