aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/handler_test.go
diff options
context:
space:
mode:
authornsfisis <54318333+nsfisis@users.noreply.github.com>2026-02-24 21:55:01 +0900
committerGitHub <noreply@github.com>2026-02-24 21:55:01 +0900
commit6d85a8f97c8c9e086f2f9b8c71fd730bff12af07 (patch)
tree4771498620c1d13ad5caa882f880943529e07aa1 /backend/admin/handler_test.go
parentb3379e09c5e724ca0a755da10f8a4d33427b09bf (diff)
parent6a939257294655dd5c1b5ada323dfdc7dfc013f3 (diff)
downloadphperkaigi-2026-albatross-6d85a8f97c8c9e086f2f9b8c71fd730bff12af07.tar.gz
phperkaigi-2026-albatross-6d85a8f97c8c9e086f2f9b8c71fd730bff12af07.tar.zst
phperkaigi-2026-albatross-6d85a8f97c8c9e086f2f9b8c71fd730bff12af07.zip
Merge pull request #8 from nsfisis/claude/find-missing-admin-features-mHZoD
Display usernames in submission lists and details
Diffstat (limited to 'backend/admin/handler_test.go')
-rw-r--r--backend/admin/handler_test.go8
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{
{