File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -562,9 +562,9 @@ def test_model_class_responds_to_last_bang
562562 end
563563
564564 def test_take_and_first_and_last_with_integer_should_use_sql_limit
565- assert_sql ( /LIMIT|ROWNUM <=/ ) { Topic . take ( 3 ) . entries }
566- assert_sql ( /LIMIT|ROWNUM <=/ ) { Topic . first ( 2 ) . entries }
567- assert_sql ( /LIMIT|ROWNUM <=/ ) { Topic . last ( 5 ) . entries }
565+ assert_sql ( /LIMIT|ROWNUM <=|FETCH FIRST / ) { Topic . take ( 3 ) . entries }
566+ assert_sql ( /LIMIT|ROWNUM <=|FETCH FIRST / ) { Topic . first ( 2 ) . entries }
567+ assert_sql ( /LIMIT|ROWNUM <=|FETCH FIRST / ) { Topic . last ( 5 ) . entries }
568568 end
569569
570570 def test_last_with_integer_and_order_should_keep_the_order
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ def test_merge_options
246246 devs = Developer . all
247247 sql = devs . to_sql
248248 assert_match "(salary = 80000)" , sql
249- assert_match " LIMIT 10" , sql
249+ assert_match / LIMIT 10|ROWNUM <= 10|FETCH FIRST 10 ROWS ONLY/ , sql
250250 end
251251 end
252252 end
You can’t perform that action at this time.
0 commit comments