fix: address code review findings
This commit is contained in:
@@ -67,7 +67,7 @@ func TestHandlerCityAutocomplete(t *testing.T) {
|
||||
t.Errorf("expected status 200, got %d", rr.Code)
|
||||
}
|
||||
|
||||
var resp []cityResponse
|
||||
var resp cityResponse
|
||||
if err := json.Unmarshal(rr.Body.Bytes(), &resp); err != nil {
|
||||
t.Fatalf("failed to unmarshal response: %v", err)
|
||||
}
|
||||
@@ -398,6 +398,9 @@ func TestHandlerStationStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAdminAuth(t *testing.T) {
|
||||
// Set admin API key for tests
|
||||
t.Setenv("TRIP_PLANNER_ADMIN_API_KEY", "trip-planner-admin-key")
|
||||
|
||||
h := newMockHandlerContext()
|
||||
|
||||
// Test 1: Request without API key should be unauthorized
|
||||
@@ -437,6 +440,9 @@ func TestAdminAuth(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAdminStationStatus(t *testing.T) {
|
||||
// Set admin API key for tests
|
||||
t.Setenv("TRIP_PLANNER_ADMIN_API_KEY", "trip-planner-admin-key")
|
||||
|
||||
h := newMockHandlerContext()
|
||||
|
||||
// Set up a station in the graph
|
||||
|
||||
Reference in New Issue
Block a user