mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
validate boolean option in connection string. proper downcase.
This commit is contained in:
parent
4721ecbf6b
commit
da2831c17d
2 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue