Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a26f72
commit 97445a1
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'helper' | ||
|
||
module SQLite3 | ||
class TestDeprecated < Test::Unit::TestCase | ||
def setup | ||
@db = SQLite3::Database.new(':memory:') | ||
end | ||
|
||
def test_query_with_many_bind_params | ||
assert_equal [[nil, 1]], @db.query("select ?, ?", nil, 1).to_a | ||
end | ||
|
||
def test_query_with_nil_bind_params | ||
assert_equal [['foo']], @db.query("select 'foo'", nil).to_a | ||
end | ||
|
||
def test_execute_with_many_bind_params | ||
assert_equal [[nil, 1]], @db.execute("select ?, ?", nil, 1) | ||
end | ||
|
||
def test_execute_with_nil_bind_params | ||
assert_equal [['foo']], @db.execute("select 'foo'", nil) | ||
end | ||
end | ||
end |