Sha256: 5be293874a3be6c163947e47d7623a723717b6566f6ec82835a3ea1afec2a485

Contents?: true

Size: 1014 Bytes

Versions: 19

Compression:

Stored size: 1014 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper.rb'

module SessionTests
  class ParamsTest < ActiveSupport::TestCase
    def test_valid_params
      ben = users(:ben)
      session = UserSession.new
    
      assert !session.valid_params?
      set_params_for(ben)
      
      assert !session.valid_params?
      assert !session.unauthorized_record
      assert !@controller.session["user_credentials"]
      
      set_request_content_type("text/plain")
      assert !session.valid_params?
      assert !session.unauthorized_record
      assert !@controller.session["user_credentials"]
      
      set_request_content_type("application/atom+xml")
      assert session.valid_params?
      assert_equal ben, session.unauthorized_record
      assert !@controller.session["user_credentials"]
      
      set_request_content_type("application/rss+xml")
      assert session.valid_params?
      assert_equal ben, session.unauthorized_record
      assert !@controller.session["user_credentials"]
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
authlogic-1.2.1 test/session_tests/params_test.rb
authlogic-1.2.2 test/session_tests/params_test.rb
authlogic-1.3.0 test/session_tests/params_test.rb
authlogic-1.1.1 test/session_tests/params_test.rb
authlogic-1.2.0 test/session_tests/params_test.rb
authlogic-1.3.1 test/session_tests/params_test.rb
authlogic-1.3.2 test/session_tests/params_test.rb
authlogic-1.1.2 test/session_tests/params_test.rb
authlogic-1.4.1 test/session_tests/params_test.rb
authlogic-1.3.4 test/session_tests/params_test.rb
authlogic-1.3.5 test/session_tests/params_test.rb
authlogic-1.3.6 test/session_tests/params_test.rb
authlogic-1.3.9 test/session_tests/params_test.rb
authlogic-1.3.8 test/session_tests/params_test.rb
authlogic-1.4.0 test/session_tests/params_test.rb
authlogic-1.3.3 test/session_tests/params_test.rb
authlogic-1.3.7 test/session_tests/params_test.rb
authlogic-1.4.3 test/session_tests/params_test.rb
authlogic-1.4.2 test/session_tests/params_test.rb