Sha256: 4024a81961ca9904fd18822d1abbb848db6fb25474330a6edbf068884da771ad

Contents?: true

Size: 739 Bytes

Versions: 3

Compression:

Stored size: 739 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")
      end
    
      def test_human_name
        assert_equal "User", 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

3 entries across 3 versions & 1 rubygems

Version Path
authlogic-2.0.1 test/session_test/active_record_trickery_test.rb
authlogic-2.0.0 test/session_test/active_record_trickery_test.rb
authlogic-2.0.2 test/session_test/active_record_trickery_test.rb