diff options
| author | Claude <noreply@anthropic.com> | 2026-02-24 12:19:35 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-02-24 12:19:35 +0000 |
| commit | 6a939257294655dd5c1b5ada323dfdc7dfc013f3 (patch) | |
| tree | 138dc38f5bf2d5d53b2eca16ab7c271c128c9f28 /backend/admin/handler_test.go | |
| parent | 6232e2f3094d53151a17db9c36f35e192d9d304d (diff) | |
| download | phperkaigi-2026-albatross-6a939257294655dd5c1b5ada323dfdc7dfc013f3.tar.gz phperkaigi-2026-albatross-6a939257294655dd5c1b5ada323dfdc7dfc013f3.tar.zst phperkaigi-2026-albatross-6a939257294655dd5c1b5ada323dfdc7dfc013f3.zip | |
fix(admin): show username in submissions and add testcase links to problems list
Submissions list and detail pages now display the username alongside the
user ID instead of showing only a numeric ID. The problems list page now
includes a direct link to each problem's testcases for easier navigation.
https://claude.ai/code/session_01JF5ZmGAQ4zNbhV5DM729Fw
Diffstat (limited to 'backend/admin/handler_test.go')
| -rw-r--r-- | backend/admin/handler_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backend/admin/handler_test.go b/backend/admin/handler_test.go index 994c584..f340fef 100644 --- a/backend/admin/handler_test.go +++ b/backend/admin/handler_test.go @@ -1182,6 +1182,11 @@ func TestGetSubmissions_Success(t *testing.T) { }, }, nil }, + listUsersFunc: func(_ context.Context) ([]db.User, error) { + return []db.User{ + {UserID: 1, Username: "alice"}, + }, nil + }, } h := newTestHandler(q) @@ -1208,6 +1213,9 @@ func TestGetSubmissionDetail_Success(t *testing.T) { CreatedAt: pgtype.Timestamp{Valid: true}, }, nil }, + getUserByIDFunc: func(_ context.Context, userID int32) (db.User, error) { + return db.User{UserID: userID, Username: "alice"}, nil + }, getTestcaseResultsBySubmIDFunc: func(_ context.Context, _ int32) ([]db.TestcaseResult, error) { return []db.TestcaseResult{ { |
