feat: Full test suite and linter - fixed test failures and increased coverage to 61.1%

This commit is contained in:
2026-08-17 17:00:10 +03:00
parent c58fbb50b1
commit 81686e9adc
8 changed files with 1344 additions and 8 deletions

View File

@@ -584,8 +584,8 @@ func TestHandlerRouteSearchIntegration(t *testing.T) {
// Replace the router with our test graph
h.Router = graph
// Create request: from city c1 (Moscow) to city c1 (same city code)
req := httptest.NewRequest("POST", "/v1/routes/search", strings.NewReader(`{"from_city_id": "c1", "to_city_id": "c1", "date": "2026-08-15"}`))
// Create request: from station s1 (Moscow) to station s3 (Vladimir)
req := httptest.NewRequest("POST", "/v1/routes/search", strings.NewReader(`{"from_city_id": "s1", "to_city_id": "s3", "date": "2026-08-15"}`))
req.Header.Set("Content-Type", "application/json")
rr := httptest.NewRecorder()