Rails 2.1 RC1
Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
This commit is contained in:
parent
14afed5893
commit
5292899c9a
971 changed files with 46318 additions and 17450 deletions
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../abstract_unit'
|
||||
require 'abstract_unit'
|
||||
|
||||
class SessionManagementTest < Test::Unit::TestCase
|
||||
class SessionOffController < ActionController::Base
|
||||
|
@ -13,6 +13,19 @@ class SessionManagementTest < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
class SessionOffOnController < ActionController::Base
|
||||
session :off
|
||||
session :on, :only => :tell
|
||||
|
||||
def show
|
||||
render :text => "done"
|
||||
end
|
||||
|
||||
def tell
|
||||
render :text => "done"
|
||||
end
|
||||
end
|
||||
|
||||
class TestController < ActionController::Base
|
||||
session :off, :only => :show
|
||||
session :session_secure => true, :except => :show
|
||||
|
@ -100,6 +113,15 @@ class SessionManagementTest < Test::Unit::TestCase
|
|||
assert_equal false, @request.session_options
|
||||
end
|
||||
|
||||
def test_session_off_then_on_globally
|
||||
@controller = SessionOffOnController.new
|
||||
get :show
|
||||
assert_equal false, @request.session_options
|
||||
get :tell
|
||||
assert_instance_of Hash, @request.session_options
|
||||
assert_equal false, @request.session_options[:disabled]
|
||||
end
|
||||
|
||||
def test_session_off_conditionally
|
||||
@controller = TestController.new
|
||||
get :show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue