aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/flash_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-05-19 23:29:39 +0200
committerXavier Noria <fxn@hashref.com>2010-05-19 23:29:39 +0200
commit7f07cc364a7ee7ceae21b29b54467fde0db93389 (patch)
tree7c9dd8aaeda68731756ee108a8318239b04c80f0 /actionpack/test/controller/flash_test.rb
parentb9fcd8d71f94702463b97545bb70ce4727c5b47e (diff)
parent61001e766de974a8864c0bc2cf915888d277a0ea (diff)
downloadrails-7f07cc364a7ee7ceae21b29b54467fde0db93389.tar.gz
rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.tar.bz2
rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/test/controller/flash_test.rb')
-rw-r--r--actionpack/test/controller/flash_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb
index c662ce264b..01c8fd90a5 100644
--- a/actionpack/test/controller/flash_test.rb
+++ b/actionpack/test/controller/flash_test.rb
@@ -237,10 +237,19 @@ class FlashIntegrationTest < ActionController::IntegrationTest
end
private
+
+ # Overwrite get to send SessionSecret in env hash
+ def get(path, parameters = nil, env = {})
+ env["action_dispatch.secret_token"] ||= SessionSecret
+ super
+ end
+
def with_test_route_set
with_routing do |set|
set.draw do |map|
- match ':action', :to => ActionDispatch::Session::CookieStore.new(FlashIntegrationTest::TestController, :key => FlashIntegrationTest::SessionKey, :secret => FlashIntegrationTest::SessionSecret)
+ match ':action', :to => ActionDispatch::Session::CookieStore.new(
+ FlashIntegrationTest::TestController, :key => SessionKey, :secret => SessionSecret
+ )
end
yield
end