diff options
Diffstat (limited to 'actionpack/test/dispatch/request_test.rb')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 2bc145c1cc..08d1c6fe73 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -799,6 +799,14 @@ class RequestTest < ActiveSupport::TestCase end end + test "url_for options[:params]" do + assert_equal 'http://www.example.com?params=', url_for(:params => '') + assert_equal 'http://www.example.com?params=1', url_for(:params => 1) + assert_equal 'http://www.example.com', url_for + assert_equal 'http://www.example.com', url_for(:params => {}) + assert_equal 'http://www.example.com?name=tumayun', url_for(:params => { :name => 'tumayun' }) + end + protected def stub_request(env = {}) |