Skip to content

Commit

Permalink
add spec for paginated_section for a single page
Browse files Browse the repository at this point in the history
Fixes mislav#90
  • Loading branch information
fabioyamate authored and mislav committed Jul 27, 2011
1 parent a1f3971 commit ca42e3c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/view_helpers/action_view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
assert_select 'div.pagination', 2
assert_select 'div.pagination + div#developers', 1
end

it "should not render a paginated section with a single page" do
@template = <<-ERB
<%= paginated_section collection, options do %>
<%= content_tag :div, '', :id => "developers" %>
<% end %>
ERB

paginate(:total_entries => 1)
assert_select 'div.pagination', 0
assert_select 'div#developers', 1
end

## parameter handling in page links ##

Expand Down

0 comments on commit ca42e3c

Please sign in to comment.