Adds a test for the `DisableCoordinate` config.

This commit is contained in:
James Phillips 2015-07-31 09:20:14 -07:00
parent f9da231a1c
commit e8322ffe00
1 changed files with 11 additions and 0 deletions

View File

@ -734,6 +734,17 @@ func TestDecodeConfig(t *testing.T) {
t.Fatalf("bad: %#v", config)
}
// Coordinate disable
input = `{"disable_coordinates": true}`
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
if err != nil {
t.Fatalf("err: %s", err)
}
if config.DisableCoordinates != true {
t.Fatalf("bad: coordinates not disabled: %#v", config)
}
// SessionTTLMin
input = `{"session_ttl_min": "5s"}`
config, err = DecodeConfig(bytes.NewReader([]byte(input)))