Fixes query_one? handling no rows (#86)

This commit is contained in:
Rob David 2018-07-11 00:47:39 +01:00 committed by Brian J. Cardiff
parent be139c900c
commit c54fab415e
2 changed files with 8 additions and 1 deletions

View file

@ -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)