diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-08 13:42:00 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-08 13:43:25 -0700 |
commit | 5dd6e1b142a5673f1ce6a882ca07e2526c43e740 (patch) | |
tree | c1ce3ed0ead5fff15d424a8e0f5280eb5c0909d2 | |
parent | 45bdbe00410afb4e77bc07cf940e6bf001abbc83 (diff) | |
download | rails-5dd6e1b142a5673f1ce6a882ca07e2526c43e740.tar.gz rails-5dd6e1b142a5673f1ce6a882ca07e2526c43e740.tar.bz2 rails-5dd6e1b142a5673f1ce6a882ca07e2526c43e740.zip |
add tests for the polymorphic_path method
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index e7769c7ce5..52dd34a5c7 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -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 |