diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-08 14:28:09 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-08 14:28:09 -0700 |
commit | 66274d6d03874160502c39ea05d8d117f00a6c3b (patch) | |
tree | 50587547da3761b0986351907fe601a55de0f648 /actionview/test/activerecord | |
parent | 5dd6e1b142a5673f1ce6a882ca07e2526c43e740 (diff) | |
download | rails-66274d6d03874160502c39ea05d8d117f00a6c3b.tar.gz rails-66274d6d03874160502c39ea05d8d117f00a6c3b.tar.bz2 rails-66274d6d03874160502c39ea05d8d117f00a6c3b.zip |
add a test for classes with options
Diffstat (limited to 'actionview/test/activerecord')
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index 52dd34a5c7..8cdb8301fd 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -192,6 +192,13 @@ class PolymorphicRoutesTest < ActionController::TestCase end end + def test_class_with_options + with_test_routes do + assert_equal "http://example.com/projects?foo=bar", polymorphic_url(@project.class, { :foo => :bar }) + assert_equal "/projects?foo=bar", polymorphic_path(@project.class, { :foo => :bar }) + end + end + def test_with_new_record with_test_routes do assert_url "http://example.com/projects", @project |