Permalink
Browse files

Added a failing test to show that the search method is ignoring named…

… scopes when given a false value, even when arity is non-zero.
  • Loading branch information...
1 parent bdeddde commit f5bc0b9f186d3613fb75917dedf96dae6e11b880 @laserlemon laserlemon committed with Nov 19, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 spec/search_spec.rb
View
@@ -338,6 +338,10 @@
User.search(:username_nil => false).proxy_options.should == {}
end
+ it "should not ignore conditions with a value of false where the named scope does not have an arity of 0" do
+ User.search(:username_is => false).proxy_options.should == User.username_is(false).proxy_options
+ end
+
it "should recognize the order condition" do
User.search(:order => "ascend_by_username").proxy_options.should == User.ascend_by_username.proxy_options
end

0 comments on commit f5bc0b9

Please sign in to comment.