Let admins edit event date and time

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 17:21:01 -04:00
parent 1f0effb902
commit 891b49b4c0
6 changed files with 78 additions and 0 deletions
+24
View File
@@ -215,6 +215,30 @@ func TestUpdateRsvp(t *testing.T) {
}
}
func TestUpdateEventDateTime(t *testing.T) {
_, q := setupTestDB(t)
ctx := context.Background()
event := createTestEvent(t, q)
err := q.UpdateEventDateTime(ctx, db.UpdateEventDateTimeParams{
Date: "Sunday, July 20", Time: "5:30 PM", ID: event.ID,
})
if err != nil {
t.Fatal(err)
}
updated, err := q.GetEventBySlug(ctx, event.Slug)
if err != nil {
t.Fatal(err)
}
if updated.Date != "Sunday, July 20" {
t.Fatalf("expected date 'Sunday, July 20', got %s", updated.Date)
}
if updated.Time != "5:30 PM" {
t.Fatalf("expected time '5:30 PM', got %s", updated.Time)
}
}
func TestCountGoing(t *testing.T) {
_, q := setupTestDB(t)
ctx := context.Background()