aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-11-09 00:13:42 +0000
committerJon Leighton <j@jonathanleighton.com>2012-11-09 00:14:13 +0000
commit484283968e8ad7dc8a7864b65603671bec4f2850 (patch)
tree6436ce8f07792aec3ec132fc4abb59d2a827cba7 /actionpack/test/controller
parent648a95b5263401264d4376a3819f9e232dcf3543 (diff)
downloadrails-484283968e8ad7dc8a7864b65603671bec4f2850.tar.gz
rails-484283968e8ad7dc8a7864b65603671bec4f2850.tar.bz2
rails-484283968e8ad7dc8a7864b65603671bec4f2850.zip
Revert "Merge pull request #8017 from jcoglan/objectless_sessions"
This reverts commit 36376560fdd02f955ae3bf6b7792b784443660ad, reversing changes made to 3148ed9a4bb7efef30b846dc945d73ceebcc3f0f. Conflicts: actionpack/lib/action_dispatch/middleware/flash.rb Reason: it broke Sam's CI https://github.com/rails/rails/pull/8017#issuecomment-10210655
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/flash_hash_test.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/actionpack/test/controller/flash_hash_test.rb b/actionpack/test/controller/flash_hash_test.rb
index 5490d9394b..ccca0dac17 100644
--- a/actionpack/test/controller/flash_hash_test.rb
+++ b/actionpack/test/controller/flash_hash_test.rb
@@ -46,27 +46,6 @@ module ActionDispatch
assert_equal({'foo' => 'bar'}, @hash.to_hash)
end
- def test_to_session_value
- @hash['foo'] = 'bar'
- assert_equal({'flashes' => {'foo' => 'bar'}, 'discard' => []}, @hash.to_session_value)
-
- @hash.discard('foo')
- assert_equal({'flashes' => {'foo' => 'bar'}, 'discard' => %w[foo]}, @hash.to_session_value)
-
- @hash.now['qux'] = 1
- assert_equal({'flashes' => {'foo' => 'bar', 'qux' => 1}, 'discard' => %w[foo qux]}, @hash.to_session_value)
-
- @hash.sweep
- assert_equal(nil, @hash.to_session_value)
- end
-
- def test_from_session_value
- rails_3_2_cookie = 'BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWY4ZTFiODE1MmJhNzYwOWMyOGJiYjE3ZWM5MjYzYmE3BjsAVEkiCmZsYXNoBjsARm86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToKQHVzZWRvOghTZXQGOgpAaGFzaHsAOgxAY2xvc2VkRjoNQGZsYXNoZXN7BkkiDG1lc3NhZ2UGOwBGSSIKSGVsbG8GOwBGOglAbm93MA=='
- session = Marshal.load(Base64.decode64(rails_3_2_cookie))
- hash = Flash::FlashHash.from_session_value(session['flash'])
- assert_equal({'flashes' => {'message' => 'Hello'}, 'discard' => %w[message]}, hash.to_session_value)
- end
-
def test_empty?
assert @hash.empty?
@hash['zomg'] = 'bears'