aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-17 18:55:21 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-18 18:57:13 -0400
commit93034ad7fea7e00562103a7cd0acfab19bbfadf9 (patch)
tree9cba660f6dd0e0c26cf9de8ecf0a818c5a87970f /actionview/test/template/url_helper_test.rb
parent70c6fb1a06d76d0d6cddb6fb50137aa1341745a0 (diff)
downloadrails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.tar.gz
rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.tar.bz2
rails-93034ad7fea7e00562103a7cd0acfab19bbfadf9.zip
Reuse the Parameters#to_h check in the routing helpers
Since this protection is now in Parameters we can use it instead of reimplementing again.
Diffstat (limited to 'actionview/test/template/url_helper_test.rb')
-rw-r--r--actionview/test/template/url_helper_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb
index 09454b32cc..a6444a1686 100644
--- a/actionview/test/template/url_helper_test.rb
+++ b/actionview/test/template/url_helper_test.rb
@@ -231,7 +231,11 @@ class UrlHelperTest < ActiveSupport::TestCase
end
def to_h
- { foo: :bar, baz: "quux" }
+ if permitted?
+ { foo: :bar, baz: "quux" }
+ else
+ raise ArgumentError
+ end
end
end