Move Ticket Name to the Participant model.

This commit is contained in:
Pen Anderson 2026-03-05 17:15:41 -06:00
parent cc4dd76438
commit e722ef055e
5 changed files with 27 additions and 27 deletions

View file

@ -337,8 +337,8 @@ func TestPublicSignupTicketNameDoesNotOverwritePreferredName(t *testing.T) {
if p.PreferredName != "Titania" {
t.Errorf("participant preferred_name = %q, want %q (not ticket_name)", p.PreferredName, "Titania")
}
if vol.TicketName != "Titania Fairweather" {
t.Errorf("vol.TicketName = %q, want %q", vol.TicketName, "Titania Fairweather")
if p.TicketName != "Titania Fairweather" {
t.Errorf("participant.TicketName = %q, want %q", p.TicketName, "Titania Fairweather")
}
}
@ -349,12 +349,11 @@ func TestConfirmEmailAssignsKioskCode(t *testing.T) {
app.db.Exec(`INSERT OR REPLACE INTO config (key, value) VALUES ('shift_signups_open', 'true')`)
app.baseURL = "https://example.com"
participant, _ := app.createParticipant(Participant{PreferredName: "Titania", Email: "titania@example.com"})
participant, _ := app.createParticipant(Participant{PreferredName: "Titania", TicketName: "Titania Fairweather", Email: "titania@example.com"})
token := "abc123def456"
app.createVolunteer(Volunteer{
Name: "Titania",
PreferredName: "Titania",
TicketName: "Titania Fairweather",
Email: "titania@example.com",
ParticipantID: &participant.ID,
ConfirmationToken: &token,