Sha256: 7e258bfc3af552a424b617fe40c9ff94ae1fcdeb4e642109e723ee4a5ee940d7

Contents?: true

Size: 835 Bytes

Versions: 15

Compression:

Stored size: 835 Bytes

Contents

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

module SessionTest
  module ActiveRecordTrickeryTest
    class ClassMethodsTest < ActiveSupport::TestCase
      def test_human_attribute_name
        assert_equal "Some attribute", UserSession.human_attribute_name("some_attribute")
        assert_equal "Some attribute", UserSession.human_attribute_name(:some_attribute)
      end
    
      def test_human_name
        assert_equal "Usersession", UserSession.human_name
      end
    
      def test_self_and_descendents_from_active_record
        assert_equal [UserSession], UserSession.self_and_descendents_from_active_record
      end
    end
    
    class InstanceMethodsTest < ActiveSupport::TestCase
      def test_new_record
        session = UserSession.new
        assert session.new_record?
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
binarylogic-authlogic-2.1.0 test/session_test/active_record_trickery_test.rb
binarylogic-authlogic-2.1.1 test/session_test/active_record_trickery_test.rb
crankharder-authlogic-2.1.1 test/session_test/active_record_trickery_test.rb
kschrader-authlogic-2.1.2 test/session_test/active_record_trickery_test.rb
kschrader-authlogic-2.1.3 test/session_test/active_record_trickery_test.rb
authlogic-2.1.0 test/session_test/active_record_trickery_test.rb
authlogic-2.1.1 test/session_test/active_record_trickery_test.rb
authlogic-2.0.11 test/session_test/active_record_trickery_test.rb
authlogic-2.0.13 test/session_test/active_record_trickery_test.rb
authlogic-2.0.12 test/session_test/active_record_trickery_test.rb
authlogic-2.0.7 test/session_test/active_record_trickery_test.rb
authlogic-2.0.6 test/session_test/active_record_trickery_test.rb
authlogic-2.0.14 test/session_test/active_record_trickery_test.rb
authlogic-2.0.8 test/session_test/active_record_trickery_test.rb
authlogic-2.0.9 test/session_test/active_record_trickery_test.rb