1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00
Former-commit-id: fe6305deed00e170bf4d39a12c0644fe686e0a24
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-10-21 19:20:05 +03:00
parent dbba631df4
commit 3962710d3d
109 changed files with 4383 additions and 2658 deletions

View File

@@ -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)
}