Skip to content

Commit

Permalink
add test that page query param will be overriden
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Sep 17, 2013
1 parent 3f221d4 commit a213b7e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/view_helpers/action_view_spec.rb
Expand Up @@ -56,6 +56,15 @@ def render(locals)
end
end

it "should override existing page param value" do
request.params :page => 1
paginate do |pagination|
assert_select 'a[href]', 3 do |elements|
validate_page_numbers [2,3,2], elements
end
end
end

it "should render nothing when there is only 1 page" do
paginate(:per_page => 30).should be_empty
end
Expand Down

0 comments on commit a213b7e

Please sign in to comment.