Let admins edit event date and time
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user