aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/integration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r--actionpack/test/controller/integration_test.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 01dc2f2091..2ad95f5c29 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -492,6 +492,8 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
end
routes.draw do
+ match '', :to => 'application_integration_test/test#index', :as => :empty_string
+
match 'foo', :to => 'application_integration_test/test#index', :as => :foo
match 'bar', :to => 'application_integration_test/test#index', :as => :bar
end
@@ -501,11 +503,15 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
end
test "includes route helpers" do
+ assert_equal '/', empty_string_path
assert_equal '/foo', foo_path
assert_equal '/bar', bar_path
end
test "route helpers after controller access" do
+ get '/'
+ assert_equal '/', empty_string_path
+
get '/foo'
assert_equal '/foo', foo_path
@@ -522,11 +528,10 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
assert_raise(NameError) { missing_path }
end
- test "process reuse the env we pass as argument" do
+ test "process do not modify the env passed as argument" do
env = { :SERVER_NAME => 'server', 'action_dispatch.custom' => 'custom' }
+ old_env = env.dup
get '/foo', nil, env
- assert_equal :get, env[:method]
- assert_equal 'server', env[:SERVER_NAME]
- assert_equal 'custom', env['action_dispatch.custom']
+ assert_equal old_env, env
end
end