fix lint
This commit is contained in:
@@ -207,9 +207,14 @@ func TestGetDebugMiddleware(t *testing.T) {
|
||||
|
||||
// Check URL info was logged
|
||||
if urlInfo, ok := details["url"].(map[string]interface{}); ok {
|
||||
assert.Contains(t, urlInfo["full"].(string), "/example")
|
||||
// Safely assert types before using Contains
|
||||
if fullURL, ok := urlInfo["full"].(string); ok {
|
||||
assert.Contains(t, fullURL, "/example")
|
||||
}
|
||||
assert.Equal(t, "/example", urlInfo["path"])
|
||||
assert.Contains(t, urlInfo["query"].(string), "param=value")
|
||||
if query, ok := urlInfo["query"].(string); ok {
|
||||
assert.Contains(t, query, "param=value")
|
||||
}
|
||||
}
|
||||
|
||||
// Check headers were logged
|
||||
|
||||
Reference in New Issue
Block a user