Skip to content

Commit 88a8257

Browse files
test(org-seats): use real Goa enum values in org-seat tests
Address PR #122 review (Copilot + jordane): the org-seat tests used values outside the Goa design enums, which the generated client validators reject and which misrepresent the contract. Per jordane, fix the test data rather than widening the enums: - Role.Name "Member" → "Lead" ("Member" is not a real committee role; the non-editable seat's role is not asserted, so any valid role works). - AppointedBy "Foundation Election" → "Community" (two sites): a valid, clearly non-entitlement appointed_by value, preserving the non-editable / forbidden-reassign test intent. No enum/production changes. gofmt/build/vet/test -race/golangci-lint all green. Signed-off-by: Luis Mori Guerra <luismorith@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent efda0fa commit 88a8257

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/committee-api/service/committee_org_seats_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ func TestGetOrgCommitteeSeats(t *testing.T) {
112112
FirstName: "Bob",
113113
LastName: "Kim",
114114
Email: "bob@example.com",
115-
Role: model.CommitteeMemberRole{Name: "Member"},
116-
AppointedBy: "Foundation Election",
115+
Role: model.CommitteeMemberRole{Name: "Lead"},
116+
AppointedBy: "Community",
117117
Organization: model.CommitteeMemberOrganization{ID: testOrgSFID},
118118
}}
119119

@@ -380,7 +380,7 @@ func TestReassignOrgCommitteeSeat(t *testing.T) {
380380

381381
t.Run("non-entitlement seat returns forbidden and never mutates", func(t *testing.T) {
382382
seat := entitlementSeat()
383-
seat.AppointedBy = "Foundation Election"
383+
seat.AppointedBy = "Community"
384384
writer := &mockCommitteeWriterOrchestrator{}
385385
reader := &reassignReaderStub{stubCommitteeReader: &stubCommitteeReader{}, member: seat, rev: 1}
386386
svc := &committeeServicesrvc{committeeWriterOrchestrator: writer, committeeReaderOrchestrator: reader}

0 commit comments

Comments
 (0)