mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Fixes query_one? handling no rows (#86)
This commit is contained in:
parent
be139c900c
commit
c54fab415e
2 changed files with 8 additions and 1 deletions
|
@ -190,6 +190,13 @@ describe DummyDriver do
|
|||
end
|
||||
end
|
||||
|
||||
it "with as, no rows" do
|
||||
with_dummy do |db|
|
||||
value = db.query_one?("", as: {a: Int64, b: Int64})
|
||||
value.should be_nil
|
||||
end
|
||||
end
|
||||
|
||||
it "with as, just one" do
|
||||
with_dummy do |db|
|
||||
value = db.query_one?("3", as: Int64)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue