Adds a test for the `DisableCoordinate` config.

This commit is contained in:
James Phillips 2015-07-31 09:20:14 -07:00
parent 3f11bfaea4
commit 8e67c37398
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) 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 // SessionTTLMin
input = `{"session_ttl_min": "5s"}` input = `{"session_ttl_min": "5s"}`
config, err = DecodeConfig(bytes.NewReader([]byte(input))) config, err = DecodeConfig(bytes.NewReader([]byte(input)))