Fix task and shift self-assignment features
This commit is contained in:
@@ -198,9 +198,8 @@ public class ShiftCrudTests : IntegrationTestBase
|
||||
{
|
||||
// Arrange
|
||||
var shiftId = Guid.NewGuid();
|
||||
var clubId = Guid.NewGuid();
|
||||
var (clubId, memberId, externalUserId) = await SeedMemberAsync("tenant1", "member@test.com");
|
||||
var createdBy = Guid.NewGuid();
|
||||
var memberId = Guid.NewGuid();
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
|
||||
using (var scope = Factory.Services.CreateScope())
|
||||
@@ -236,7 +235,7 @@ public class ShiftCrudTests : IntegrationTestBase
|
||||
}
|
||||
|
||||
SetTenant("tenant1");
|
||||
AuthenticateAs("member@test.com", new Dictionary<string, string> { ["tenant1"] = "Member" });
|
||||
AuthenticateAs("member@test.com", new Dictionary<string, string> { ["tenant1"] = "Member" }, externalUserId);
|
||||
|
||||
// Act
|
||||
var response = await Client.GetAsync($"/api/shifts/{shiftId}");
|
||||
@@ -707,6 +706,6 @@ public class ShiftCrudTests : IntegrationTestBase
|
||||
|
||||
// Response DTOs for test assertions
|
||||
public record ShiftListResponse(List<ShiftListItemResponse> Items, int Total, int Page, int PageSize);
|
||||
public record ShiftListItemResponse(Guid Id, string Title, DateTimeOffset StartTime, DateTimeOffset EndTime, int Capacity, int CurrentSignups);
|
||||
public record ShiftListItemResponse(Guid Id, string Title, DateTimeOffset StartTime, DateTimeOffset EndTime, int Capacity, int CurrentSignups, bool IsSignedUp);
|
||||
public record ShiftDetailResponse(Guid Id, string Title, string? Description, string? Location, DateTimeOffset StartTime, DateTimeOffset EndTime, int Capacity, List<ShiftSignupResponse> Signups, Guid ClubId, Guid CreatedById, DateTimeOffset CreatedAt, DateTimeOffset UpdatedAt);
|
||||
public record ShiftSignupResponse(Guid Id, Guid MemberId, DateTimeOffset SignedUpAt);
|
||||
|
||||
Reference in New Issue
Block a user