Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a failing test to demonstrate that OR-joined association condit…

…ions fail if they depend on last_condition.
  • Loading branch information...
commit 10e66e7c84695c39844b45bddb87dc9a950e78c1 1 parent 6f487df
@laserlemon laserlemon authored committed
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
@@ -42,5 +42,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%')"}
+ User.company_name_or_name_like("ben").proxy_options.should == {:joins => :company, :conditions => "(companies.name LIKE '%ben%') OR (users.name LIKE '%ben%')"}
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.