Skip to content

Commit

Permalink
Better SQL regex for testing named scopes can be tagged onto group as…
Browse files Browse the repository at this point in the history
…socation.
  • Loading branch information
metaskills committed Sep 29, 2008
1 parent 52ff2ff commit 9c438e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/grouped_scope/has_many_association_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9c438e9

Please sign in to comment.