Skip to content

Commit

Permalink
Rails 5+ compatibility in tests
Browse files Browse the repository at this point in the history
HTML::Node and related classes came from html-scanner within
rails-deprecated_sanitizer, which is no longer a dependency of
rails-dom-testing.
  • Loading branch information
mislav committed Sep 20, 2016
1 parent 628e25e commit 4626f6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/view_helpers/action_view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
end

it "should paginate with custom route page parameter" do
request.symbolized_path_parameters.update :controller => 'dummy', :action => nil
request.symbolized_path_parameters.update :controller => 'dummy', :action => 'index'
paginate :per_page => 2 do
assert_select 'a[href]', 6 do |links|
assert_links_match %r{/page/(\d+)$}, links, [2, 3, 4, 5, 6, 2]
Expand All @@ -268,7 +268,7 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
end

it "should paginate with custom route and first page number implicit" do
request.symbolized_path_parameters.update :controller => 'ibocorp', :action => nil
request.symbolized_path_parameters.update :controller => 'ibocorp', :action => 'index'
paginate :page => 2, :per_page => 2 do
assert_select 'a[href]', 7 do |links|
assert_links_match %r{/ibocorp(?:/(\d+))?$}, links, [nil, nil, 3, 4, 5, 6, 3]
Expand Down
2 changes: 1 addition & 1 deletion spec/view_helpers/view_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ def inner_text
childless?? '' : super
end
end
end
end if defined?(HTML)

0 comments on commit 4626f6e

Please sign in to comment.