Skip to content
Browse files

Expanded upon the now-passing OR-join association scope test, to chec…

…k for properly formed proxy_options.
  • Loading branch information...
1 parent e724d6d commit 6f487dff4c52a2653ab53a3570954062dc205106 @laserlemon laserlemon committed with Oct 2, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 spec/named_scopes/or_conditions_spec.rb
View
1 spec/named_scopes/or_conditions_spec.rb
@@ -41,5 +41,6 @@
it "should play nice with scopes on associations" do
lambda { User.name_or_company_name_like("ben") }.should_not raise_error(Searchlogic::NamedScopes::OrConditions::NoConditionSpecifiedError)
+ User.name_or_company_name_like("ben").proxy_options.should == {:joins => :company, :conditions => "(users.name LIKE '%ben%') OR (companies.name LIKE '%ben%')"}
end
end

0 comments on commit 6f487df

Please sign in to comment.
Something went wrong with that request. Please try again.