diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-07 17:17:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-07 17:17:06 +0100 |
commit | 3b631df101d911d57ac3fe97514c60ae412e3812 (patch) | |
tree | f7ed5301d70e3113422374f1d0237584a6b6f30b /actionpack/test/controller | |
parent | f149eb19d4675becee164fee2881a562cdaa0551 (diff) | |
download | rails-3b631df101d911d57ac3fe97514c60ae412e3812.tar.gz rails-3b631df101d911d57ac3fe97514c60ae412e3812.tar.bz2 rails-3b631df101d911d57ac3fe97514c60ae412e3812.zip |
Ensure that segments in default_url_options also work with format specified.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/base_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 3d43688902..1510a6a7e0 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -172,8 +172,16 @@ class DefaultUrlOptionsTest < ActionController::TestCase get :from_view, :route => "description_path(1)" assert_equal '/en/descriptions/1', @response.body + assert_equal '/en/descriptions', @controller.send(:descriptions_path) + assert_equal '/pl/descriptions', @controller.send(:descriptions_path, "pl") + assert_equal '/pl/descriptions', @controller.send(:descriptions_path, :locale => "pl") + assert_equal '/pl/descriptions.xml', @controller.send(:descriptions_path, "pl", "xml") + assert_equal '/en/descriptions.xml', @controller.send(:descriptions_path, :format => "xml") assert_equal '/en/descriptions/1', @controller.send(:description_path, 1) + assert_equal '/pl/descriptions/1', @controller.send(:description_path, "pl", 1) assert_equal '/pl/descriptions/1', @controller.send(:description_path, 1, :locale => "pl") + assert_equal '/pl/descriptions/1.xml', @controller.send(:description_path, "pl", 1, "xml") + assert_equal '/en/descriptions/1.xml', @controller.send(:description_path, 1, :format => "xml") end end |