Sha256: 562c3405b6117a06bec424e1ad1dec4df942cd0a6d2977c655c52acc9a8ea202

Contents?: true

Size: 603 Bytes

Versions: 14

Compression:

Stored size: 603 Bytes

Contents

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

module SessionTest
  class ValidationTest < ActiveSupport::TestCase
    def test_errors
      session = UserSession.new
      assert session.errors.is_a?(Authlogic::Session::Validation::Errors)
    end

    def test_valid
      session = UserSession.new
      assert !session.valid?
      assert_nil session.record
      assert session.errors.count > 0

      ben = users(:ben)
      session.unauthorized_record = ben
      assert session.valid?
      assert_equal ben, session.attempted_record
      assert session.errors.empty?
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
refinerycms-0.9.6.34 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.33 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.32 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.31 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.30 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.29 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.28 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.27 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.26 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.25 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.24 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.23 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.22 vendor/plugins/authlogic/test/session_test/validation_test.rb
refinerycms-0.9.6.21 vendor/plugins/authlogic/test/session_test/validation_test.rb