style(backend): apply dotnet format whitespace normalization

- Applied dotnet format to 24 files in backend/
- Corrects spacing, indentation, and formatting consistency
- No functional changes to code logic

Ultraworked with Sisyphus <https://github.com/code-yeongyu/oh-my-opencode>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
WorkClub Automation
2026-03-05 11:07:19 +01:00
parent 8ba22d3dc3
commit 1a5d5e8651
23 changed files with 190 additions and 189 deletions

View File

@@ -20,14 +20,14 @@ public class MemberEndpointsTests : IntegrationTestBase
{
using var scope = Factory.Services.CreateScope();
var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
context.Members.RemoveRange(context.Members);
context.Clubs.RemoveRange(context.Clubs);
await context.SaveChangesAsync();
var club1Id = Guid.NewGuid();
var club2Id = Guid.NewGuid();
context.Clubs.AddRange(
new Club
{
@@ -109,15 +109,15 @@ public class MemberEndpointsTests : IntegrationTestBase
public async Task GetMembers_ReturnsOnlyCurrentTenantMembers()
{
SetTenant("tenant1");
AuthenticateAs("admin@test.com", new Dictionary<string, string>
{
AuthenticateAs("admin@test.com", new Dictionary<string, string>
{
["tenant1"] = "Admin"
}, userId: "admin-user-id");
var response = await Client.GetAsync("/api/members");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var members = await response.Content.ReadFromJsonAsync<List<MemberListResponse>>();
Assert.NotNull(members);
Assert.Equal(3, members.Count);
@@ -128,15 +128,15 @@ public class MemberEndpointsTests : IntegrationTestBase
public async Task GetMembers_DifferentTenant_ReturnsDifferentMembers()
{
SetTenant("tenant2");
AuthenticateAs("other@test.com", new Dictionary<string, string>
{
AuthenticateAs("other@test.com", new Dictionary<string, string>
{
["tenant2"] = "Member"
}, userId: "other-user-id");
var response = await Client.GetAsync("/api/members");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var members = await response.Content.ReadFromJsonAsync<List<MemberListResponse>>();
Assert.NotNull(members);
Assert.Single(members);
@@ -147,8 +147,8 @@ public class MemberEndpointsTests : IntegrationTestBase
public async Task GetMembers_AsViewer_ReturnsForbidden()
{
SetTenant("tenant1");
AuthenticateAs("viewer@test.com", new Dictionary<string, string>
{
AuthenticateAs("viewer@test.com", new Dictionary<string, string>
{
["tenant1"] = "Viewer"
}, userId: "viewer-user-id");
@@ -165,15 +165,15 @@ public class MemberEndpointsTests : IntegrationTestBase
var member = await context.Members.FirstAsync(m => m.Email == "manager@test.com");
SetTenant("tenant1");
AuthenticateAs("admin@test.com", new Dictionary<string, string>
{
AuthenticateAs("admin@test.com", new Dictionary<string, string>
{
["tenant1"] = "Admin"
}, userId: "admin-user-id");
var response = await Client.GetAsync($"/api/members/{member.Id}");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await response.Content.ReadFromJsonAsync<MemberDetailResponse>();
Assert.NotNull(result);
Assert.Equal(member.Id, result.Id);
@@ -190,8 +190,8 @@ public class MemberEndpointsTests : IntegrationTestBase
var tenant1Member = await context.Members.FirstAsync(m => m.TenantId == "tenant1");
SetTenant("tenant2");
AuthenticateAs("other@test.com", new Dictionary<string, string>
{
AuthenticateAs("other@test.com", new Dictionary<string, string>
{
["tenant2"] = "Member"
}, userId: "other-user-id");
@@ -204,15 +204,15 @@ public class MemberEndpointsTests : IntegrationTestBase
public async Task GetMembersMe_ReturnsCurrentUserMembership()
{
SetTenant("tenant1");
AuthenticateAs("manager@test.com", new Dictionary<string, string>
{
AuthenticateAs("manager@test.com", new Dictionary<string, string>
{
["tenant1"] = "Manager"
}, userId: "manager-user-id");
var response = await Client.GetAsync("/api/members/me");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var result = await response.Content.ReadFromJsonAsync<MemberDetailResponse>();
Assert.NotNull(result);
Assert.Equal("Manager User", result.DisplayName);
@@ -224,8 +224,8 @@ public class MemberEndpointsTests : IntegrationTestBase
public async Task MemberAutoSync_NewUser_CreatesMembeRecordFromJwt()
{
SetTenant("tenant1");
AuthenticateAs("newuser@test.com", new Dictionary<string, string>
{
AuthenticateAs("newuser@test.com", new Dictionary<string, string>
{
["tenant1"] = "Member"
}, userId: "new-user-id");
@@ -236,7 +236,7 @@ public class MemberEndpointsTests : IntegrationTestBase
using var scope = Factory.Services.CreateScope();
var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
var syncedMember = await context.Members.FirstOrDefaultAsync(m => m.ExternalUserId == "new-user-id");
Assert.NotNull(syncedMember);
Assert.Equal("newuser@test.com", syncedMember.Email);
Assert.Equal("tenant1", syncedMember.TenantId);
@@ -251,8 +251,8 @@ public class MemberEndpointsTests : IntegrationTestBase
var initialCount = await context1.Members.CountAsync(m => m.ExternalUserId == "admin-user-id");
SetTenant("tenant1");
AuthenticateAs("admin@test.com", new Dictionary<string, string>
{
AuthenticateAs("admin@test.com", new Dictionary<string, string>
{
["tenant1"] = "Admin"
}, userId: "admin-user-id");
@@ -262,7 +262,7 @@ public class MemberEndpointsTests : IntegrationTestBase
using var scope2 = Factory.Services.CreateScope();
var context2 = scope2.ServiceProvider.GetRequiredService<AppDbContext>();
var finalCount = await context2.Members.CountAsync(m => m.ExternalUserId == "admin-user-id");
Assert.Equal(initialCount, finalCount);
}
}