1 // Copyright (c) 2012-2016 The Revel Framework Authors, All rights reserved.
2 // Revel Framework source code and usage is governed by a MIT style
3 // license that can be found in the LICENSE file.
9 func TestToBooleanForFalse(t *testing.T) {
12 ToBool(map[string]string{}) ||
21 t.Error("Expected 'false' got 'true'")
25 func TestToBooleanForTrue(t *testing.T) {
26 if !ToBool([]string{"true"}) ||
27 !ToBool(map[string]string{"true": "value"}) ||
30 !ToBool("not empty") ||
36 t.Error("Expected 'true' got 'false'")