Skip to content

Commit 6244986

Browse files
committed
Add failing test for a basic raw prepared statement query (test does not exist in active record tests)
1 parent 9117182 commit 6244986

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/simple.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,15 @@ def test_create_partial_new_entry
243243
Entry.create(:title => "Bloh")
244244
end
245245

246+
def test_find_time_with_raw_prepared_statement
247+
user = User.new(login: "jessec")
248+
249+
assert_equal true, user.save
250+
251+
right_now = Time.current
252+
assert_equal 1, User.where("created_at <= ?", right_now).to_a.size
253+
end
254+
246255
def test_find_and_update_entry
247256
title = "First post!"
248257
content = "Hello from JRuby on Rails!"

0 commit comments

Comments
 (0)