Bifrost: Google is a sign-in provider now; the old refusal test keeps only its member-access half

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-29 21:10:37 +01:00
commit 02a9404fdf

View file

@ -374,13 +374,12 @@ public sealed class HeimdallGoogleLinkTests
Assert.DoesNotContain("now linked to your", hostile);
}
// ---- 6. google stays out of sign-in and member access ----
// ---- 6. google is a sign-in provider, but gives no member access ----
[Theory]
[InlineData("/auth/heimdall/google")]
[InlineData("/auth/heimdall/google?access=member")]
[InlineData("/auth/heimdall/Google")]
public async Task Google_is_refused_as_a_sign_in_provider_and_asks_Heimdall_for_nothing(string url)
[InlineData("/auth/heimdall/Google?access=member")]
public async Task Google_is_refused_for_member_access_and_asks_Heimdall_for_nothing(string url)
{
using var host = new HeimdallHost(realSessions: true);
@ -391,6 +390,17 @@ public sealed class HeimdallGoogleLinkTests
Assert.Empty(host.Heimdall.StartBodies);
}
[Fact]
public async Task A_plain_google_sign_in_starts_at_Heimdall_with_no_grant_when_no_invite_is_held()
{
using var host = new HeimdallHost(realSessions: true);
var start = await host.StartAtAsync("/auth/heimdall/google");
Assert.NotEqual(ErrorRedirect, Location(start.Response));
Assert.DoesNotContain("firstLoginGrant", Assert.Single(host.Heimdall.StartBodies));
}
// ---- 7. nothing secret leaves the request ----
[Fact]