Skip to content

Commit

Permalink
fix for items test
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jan 13, 2019
1 parent e9ab4a1 commit a64a8bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/pagy/extras/items_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@

it 'renders items selector' do
@pagy = Pagy.new count: 1000, page: 3
html, id = frontend.pagy_items_selector(@pagy), caller(0,1)[0].hash
html = frontend.pagy_items_selector(@pagy, 'test-id')

html.must_equal \
%(<span id="#{id}">) +
%(<span id="test-id">) +
%(<a href="/foo?page=#{Pagy::Frontend::MARKER}-page-&items=#{Pagy::Frontend::MARKER}-items-"></a>) +
%(Show <input type="number" min="1" max="100" value="20" style="padding: 0; text-align: center; width: 3rem;"> items per page) +
%(</span>) +
%(<script type="application/json" class="pagy-json">["items","#{id}","#{Pagy::Frontend::MARKER}",41]</script>)
%(<script type="application/json" class="pagy-json">["items","test-id","#{Pagy::Frontend::MARKER}",41]</script>)
end

end
Expand Down

0 comments on commit a64a8bd

Please sign in to comment.