From 00d1a57e9f99a1b2439281cb741fd82ef47a5c55 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 30 Apr 2009 17:26:03 -0500 Subject: Start moving TestRequest and TestResponse into ActionDispatch --- actionpack/test/controller/routing_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/test/controller/routing_test.rb') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index ef56119751..77abb68f32 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1923,7 +1923,7 @@ class RouteSetTest < Test::Unit::TestCase end end - request.path = "/people" + request.request_uri = "/people" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("index", request.path_parameters[:action]) @@ -1945,7 +1945,7 @@ class RouteSetTest < Test::Unit::TestCase } request.recycle! - request.path = "/people/5" + request.request_uri = "/people/5" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("show", request.path_parameters[:action]) @@ -2047,7 +2047,7 @@ class RouteSetTest < Test::Unit::TestCase end end - request.path = "/people/5" + request.request_uri = "/people/5" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("show", request.path_parameters[:action]) @@ -2059,7 +2059,7 @@ class RouteSetTest < Test::Unit::TestCase assert_equal("update", request.path_parameters[:action]) request.recycle! - request.path = "/people/5.png" + request.request_uri = "/people/5.png" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("show", request.path_parameters[:action]) -- cgit v1.2.3 From b77602824afe07dfd8fd8e48407a6086802ec7ef Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 23 May 2009 01:40:50 +0200 Subject: Add some more tests to the test_new_base_on_old_tests task --- actionpack/test/controller/routing_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/test/controller/routing_test.rb') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 77abb68f32..11bffdb42e 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'controller/fake_controllers' +require 'active_support/dependencies' class MilestonesController < ActionController::Base def index() head :ok end -- cgit v1.2.3 From 61c471eebb3718a3ef5741e1e4d0974be7483290 Mon Sep 17 00:00:00 2001 From: Eduard Bondarenko Date: Wed, 27 May 2009 14:53:05 -0500 Subject: Add % to RESERVED_PCHAR [#2574 state:resolved] Signed-off-by: Joshua Peek --- actionpack/test/controller/routing_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test/controller/routing_test.rb') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 11bffdb42e..1694fc8f3e 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -90,6 +90,11 @@ class StaticSegmentTest < Test::Unit::TestCase assert_equal 'Hello World', s.interpolation_chunk end + def test_value_should_not_be_double_unescaped + s = ROUTING::StaticSegment.new('%D0%9A%D0%B0%D1%80%D1%82%D0%B0') # Карта + assert_equal '%D0%9A%D0%B0%D1%80%D1%82%D0%B0', s.interpolation_chunk + end + def test_regexp_chunk_should_escape_specials s = ROUTING::StaticSegment.new('Hello*World') assert_equal 'Hello\*World', s.regexp_chunk -- cgit v1.2.3