mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add tests for the polymorphic_path method
This commit is contained in:
parent
45bdbe0041
commit
5dd6e1b142
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ class PolymorphicRoutesTest < ActionController::TestCase
|
|||
end
|
||||
|
||||
def assert_url(url, args)
|
||||
host = self.class.default_url_options[:host]
|
||||
|
||||
assert_equal url.sub(/http:\/\/#{host}/, ''), polymorphic_path(args)
|
||||
assert_equal url, polymorphic_url(args)
|
||||
assert_equal url, url_for(args)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue