validate boolean option in connection string. proper downcase.

This commit is contained in:
Brian J. Cardiff 2016-12-05 10:38:46 -03:00
parent 4721ecbf6b
commit da2831c17d
2 changed files with 12 additions and 3 deletions

View file

@ -107,5 +107,9 @@ describe DB do
DB.fetch_bool(HTTP::Params.parse("bar=true"), "foo", false).should be_false
DB.fetch_bool(HTTP::Params.parse("bar=true"), "foo", true).should be_true
expect_raises(ArgumentError, %(invalid "other" value for option "foo")) do
DB.fetch_bool(HTTP::Params.parse("foo=other"), "foo", true)
end
end
end