test: cover a permitted relink through a variable update

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-09-28 09:01:13 +02:00
co-authored by Claude Opus 5.5
parent 660a02c23a
commit 653bf9c01c
@@ -438,5 +438,19 @@ async fn test_oauth_account_link_requires_ownership(db: Pool<Postgres>) -> anyho
"bob can read a variable linking it"
);
let status = client()
.post(format!("{base}/update/u/bob/alias"))
.header("Authorization", "Bearer BOB_TOKEN_TEST12")
.json(&json!({ "account": alice_account }))
.send()
.await?
.status();
assert_eq!(status, 200);
assert_eq!(
linked("u/bob/alias").await,
Some(alice_account),
"and a permitted relink through an update lands"
);
Ok(())
}