Skip to content

Commit

Permalink
Added test for empty? on grouped relation
Browse files Browse the repository at this point in the history
  • Loading branch information
phene committed Sep 8, 2011
1 parent c3373f6 commit ac9aed9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/finders/active_record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac9aed9

Please sign in to comment.