diff --git a/test/grouped_scope/has_many_association_test.rb b/test/grouped_scope/has_many_association_test.rb index 29991f9..09fe390 100644 --- a/test/grouped_scope/has_many_association_test.rb +++ b/test/grouped_scope/has_many_association_test.rb @@ -67,8 +67,9 @@ def setup end should 'use assoc extension SQL along with group reflection' do - assert_sql(/'URGENT'/,/"?reports"?.employee_id IN/) do - @e2.group.reports(true).urgent + sql_regex = /SELECT \* FROM "?reports"? *WHERE \("?reports"?.employee_id IN \(2,3\) AND \("?reports"?."?title"? = 'URGENT'\)\)/ + assert_sql(sql_regex) do + @e2.group.reports.urgent end end