Skip to content
Browse files

Added test for empty? on grouped relation

  • Loading branch information...
1 parent c3373f6 commit ac9aed93b6e3091e410b83c69a1378384c532e70 @phene committed
Showing with 7 additions and 0 deletions.
  1. +7 −0 spec/finders/active_record_spec.rb
View
7 spec/finders/active_record_spec.rb
@@ -131,6 +131,13 @@
topics.should_not be_empty
}.should run_queries(1)
end
+
+ it "support empty? for grouped queries" do
+ topics = Topic.group(:project_id).paginate :page => 1, :per_page => 3
+ lambda {
+ topics.should_not be_empty
+ }.should run_queries(1)
+ end
it "overrides total_entries count with a fixed value" do
lambda {

0 comments on commit ac9aed9

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