mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
add 'Configuration.PathIntelligence' and 'OnErrorCode' and 'OnAnyErrorCode' on APIContainer
Former-commit-id: bc3d0232106622063205f326bfa4ed3aa84179de
This commit is contained in:
@@ -146,6 +146,7 @@ func TestConfigurationYAML(t *testing.T) {
|
||||
yamlConfigurationContents := `
|
||||
DisablePathCorrection: false
|
||||
DisablePathCorrectionRedirection: true
|
||||
EnablePathIntelligence: true
|
||||
EnablePathEscape: false
|
||||
FireMethodNotAllowed: true
|
||||
EnableOptimizations: true
|
||||
@@ -175,6 +176,10 @@ Other:
|
||||
t.Fatalf("error on TestConfigurationYAML: Expected DisablePathCorrectionRedirection %v but got %v", expected, c.DisablePathCorrectionRedirection)
|
||||
}
|
||||
|
||||
if expected := true; c.EnablePathIntelligence != expected {
|
||||
t.Fatalf("error on TestConfigurationYAML: Expected EnablePathIntelligence %v but got %v", expected, c.EnablePathIntelligence)
|
||||
}
|
||||
|
||||
if expected := false; c.EnablePathEscape != expected {
|
||||
t.Fatalf("error on TestConfigurationYAML: Expected EnablePathEscape %v but got %v", expected, c.EnablePathEscape)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user