mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
Version 11 released. Read https://github.com/kataras/iris/blob/master/HISTORY.md#su-21-october-2018--v1100
Former-commit-id: fe6305deed00e170bf4d39a12c0644fe686e0a24
This commit is contained in:
@@ -77,13 +77,12 @@ func TestConfigurationOptions(t *testing.T) {
|
||||
func TestConfigurationOptionsDeep(t *testing.T) {
|
||||
charset := "MYCHARSET"
|
||||
|
||||
app := New().Configure(WithCharset(charset), WithoutBodyConsumptionOnUnmarshal, WithoutBanner, WithoutVersionChecker)
|
||||
app := New().Configure(WithCharset(charset), WithoutBodyConsumptionOnUnmarshal, WithoutBanner)
|
||||
|
||||
expected := DefaultConfiguration()
|
||||
expected.Charset = charset
|
||||
expected.DisableBodyConsumptionOnUnmarshal = true
|
||||
expected.DisableStartupLog = true
|
||||
expected.DisableVersionChecker = true
|
||||
|
||||
has := *app.config
|
||||
|
||||
@@ -142,7 +141,6 @@ func TestConfigurationYAML(t *testing.T) {
|
||||
}()
|
||||
|
||||
yamlConfigurationContents := `
|
||||
DisableVersionChecker: true
|
||||
DisablePathCorrection: false
|
||||
EnablePathEscape: false
|
||||
FireMethodNotAllowed: true
|
||||
@@ -165,10 +163,6 @@ Other:
|
||||
|
||||
c := app.config
|
||||
|
||||
if expected := true; c.DisableVersionChecker != expected {
|
||||
t.Fatalf("error on TestConfigurationYAML: Expected DisableVersionChecker %v but got %v", expected, c.DisableVersionChecker)
|
||||
}
|
||||
|
||||
if expected := false; c.DisablePathCorrection != expected {
|
||||
t.Fatalf("error on TestConfigurationYAML: Expected DisablePathCorrection %v but got %v", expected, c.DisablePathCorrection)
|
||||
}
|
||||
@@ -241,7 +235,6 @@ func TestConfigurationTOML(t *testing.T) {
|
||||
}()
|
||||
|
||||
tomlConfigurationContents := `
|
||||
DisableVersionChecker = true
|
||||
EnablePathEscape = false
|
||||
FireMethodNotAllowed = true
|
||||
EnableOptimizations = true
|
||||
@@ -265,10 +258,6 @@ Charset = "UTF-8"
|
||||
|
||||
c := app.config
|
||||
|
||||
if expected := true; c.DisableVersionChecker != expected {
|
||||
t.Fatalf("error on TestConfigurationTOML: Expected DisableVersionChecker %v but got %v", expected, c.DisableVersionChecker)
|
||||
}
|
||||
|
||||
if expected := false; c.DisablePathCorrection != expected {
|
||||
t.Fatalf("error on TestConfigurationTOML: Expected DisablePathCorrection %v but got %v", expected, c.DisablePathCorrection)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user