Permalink
Browse files

Add tests for [7727]. Closes #6090 [dkubb, mpalmer, tarmo]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent b3d9e23 commit 8a2fa23cd1bd0c91ecef8ff20c3d6cbe11d6734d @jeremy jeremy committed Oct 8, 2007
Showing with 15 additions and 0 deletions.
  1. +15 −0 actionpack/test/controller/test_test.rb
View
15 actionpack/test/controller/test_test.rb
@@ -25,6 +25,10 @@ def test_uri
render :text => request.request_uri
end
+ def test_query_string
+ render :text => request.query_string
+ end
+
def test_html_output
render :text => <<HTML
<html>
@@ -143,6 +147,17 @@ def test_process_with_request_uri_with_params_with_explicit_uri
assert_equal "/explicit/uri", @response.body
end
+ def test_process_with_query_string
+ process :test_query_string, :q => 'test'
+ assert_equal "q=test", @response.body
+ end
+
+ def test_process_with_query_string_with_explicit_uri
+ @request.set_REQUEST_URI "/explicit/uri?q=test?extra=question"
+ process :test_query_string
+ assert_equal "q=test?extra=question", @response.body
+ end
+
def test_multiple_calls
process :test_only_one_param, :left => true
assert_equal "OK", @response.body

0 comments on commit 8a2fa23

Please sign in to comment.