Skip to content

Commit 011e01f

Browse files
committed
Merge pull request #96 from jdberry/patch-65
Improve test for #65 to prove that the blob is passed into the function ...
2 parents 7e50c47 + 942a672 commit 011e01f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_database.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ def test_define_varargs
246246

247247
def test_call_func_blob
248248
called_with = nil
249-
@db.define_function("hello") do |a, b, c|
250-
called_with = [a, b, c]
249+
@db.define_function("hello") do |a, b|
250+
called_with = [a, b, a.length]
251251
nil
252252
end
253253
blob = Blob.new("a\0fine\0kettle\0of\0fish")
254-
@db.execute("select hello(?, length(?), length(?))", [blob, blob, blob])
254+
@db.execute("select hello(?, length(?))", [blob, blob])
255255
assert_equal [blob, blob.length, 21], called_with
256256
end
257257

0 commit comments

Comments
 (0)