Changeset 4451
- Timestamp:
- 06/16/06 03:22:09 (2 years ago)
- Files:
-
- trunk/actionpack/test/controller/routing_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/test/controller/routing_test.rb
r4444 r4451 843 843 844 844 def test_simple_build_query_string 845 assert_equal '?x=1&y=2', @route.build_query_string(:x => '1', :y => '2')845 assert_equal '?x=1&y=2', order_query_string(@route.build_query_string(:x => '1', :y => '2')) 846 846 end 847 847 848 848 def test_convert_ints_build_query_string 849 assert_equal '?x=1&y=2', @route.build_query_string(:x => 1, :y => 2)849 assert_equal '?x=1&y=2', order_query_string(@route.build_query_string(:x => 1, :y => 2)) 850 850 end 851 851 852 852 def test_escape_spaces_build_query_string 853 assert_equal '?x=hello+world&y=goodbye+world', @route.build_query_string(:x => 'hello world', :y => 'goodbye world')853 assert_equal '?x=hello+world&y=goodbye+world', order_query_string(@route.build_query_string(:x => 'hello world', :y => 'goodbye world')) 854 854 end 855 855 856 856 def test_expand_array_build_query_string 857 assert_equal '?x[]=1&x[]=2', @route.build_query_string(:x => [1, 2])857 assert_equal '?x[]=1&x[]=2', order_query_string(@route.build_query_string(:x => [1, 2])) 858 858 end 859 859 860 860 def test_escape_spaces_build_query_string_selected_keys 861 assert_equal '?x=hello+world', @route.build_query_string({:x => 'hello world', :y => 'goodbye world'}, [:x]) 862 end 861 assert_equal '?x=hello+world', order_query_string(@route.build_query_string({:x => 'hello world', :y => 'goodbye world'}, [:x])) 862 end 863 864 private 865 def order_query_string(qs) 866 '?' + qs[1..-1].split('&').sort.join('&') 867 end 863 868 end 864 869 … … 1302 1307 end 1303 1308 1309 def test_routing_traversal_does_not_load_extra_classes 1310 assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded" 1311 set.draw do |map| 1312 map.connect '/profile', :controller => 'profile' 1313 end 1314 1315 request.path = '/profile' 1316 1317 set.recognize(request) rescue nil 1318 1319 assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded" 1320 end 1304 1321 1305 1322 def test_recognize_with_conditions_and_format