From 653bf9c01c7a577e65f2cc84ffe7009ba2072d3b Mon Sep 17 00:00:00 2001 From: hugocasa Date: Mon, 28 Sep 2026 09:01:10 +0200 Subject: [PATCH] test: cover a permitted relink through a variable update Co-Authored-By: Claude Opus 5.5 --- .../tests/variables.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backend/windmill-api-integration-tests/tests/variables.rs b/backend/windmill-api-integration-tests/tests/variables.rs index 64dbb8316a..b74e50ac88 100644 --- a/backend/windmill-api-integration-tests/tests/variables.rs +++ b/backend/windmill-api-integration-tests/tests/variables.rs @@ -438,5 +438,19 @@ async fn test_oauth_account_link_requires_ownership(db: Pool) -> 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(()) }