From 5219aa90083a76832c6691bdef6fe3dc51a69281 Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Tue, 13 Mar 2007 20:44:16 +0000
Subject: Cookie session store: raise ArgumentError when :session_key is blank.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
 actionpack/test/controller/session/cookie_store_test.rb | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'actionpack/test/controller')

diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb
index 6d98821cfd..88425b9f02 100755
--- a/actionpack/test/controller/session/cookie_store_test.rb
+++ b/actionpack/test/controller/session/cookie_store_test.rb
@@ -37,6 +37,12 @@ class CookieStoreTest < Test::Unit::TestCase
     ENV.delete('HTTP_COOKIE')
   end
 
+  def test_raises_argument_error_if_missing_session_key
+    [nil, ''].each do |blank|
+      assert_raise(ArgumentError, blank.inspect) { new_session 'session_key' => blank }
+    end
+  end
+
   def test_raises_argument_error_if_missing_secret
     [nil, ''].each do |blank|
       assert_raise(ArgumentError, blank.inspect) { new_session 'secret' => blank }
-- 
cgit v1.2.3