Sha256: c2ad0382faa745cd15692bbd6302adb7212bc0a5e195e7af05394a7cdce2ce04

Contents?: true

Size: 1.08 KB

Versions: 25

Compression:

Stored size: 1.08 KB

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
    
      def test_self_and_descendants_from_active_record
        assert_equal [UserSession], UserSession.self_and_descendants_from_active_record
      end
    end
    
    class InstanceMethodsTest < ActiveSupport::TestCase
      def test_new_record
        session = UserSession.new
        assert session.new_record?
      end
      
      def test_to_model
        session = UserSession.new
        assert session, session.to_model
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 12 rubygems

Version Path
jlecour-authlogic-2.1.2 test/session_test/active_record_trickery_test.rb
expertiza-authlogic-2.1.6.1 test/session_test/active_record_trickery_test.rb
wulffeld_authlogic-2.1.3 test/session_test/active_record_trickery_test.rb
authlogic-2.1.6 test/session_test/active_record_trickery_test.rb
lockbox_middleware-1.2.1 vendor/gems/authlogic-2.1.3/test/session_test/active_record_trickery_test.rb
Empact-authlogic-2.1.5 test/session_test/active_record_trickery_test.rb
authlogic-2.1.5 test/session_test/active_record_trickery_test.rb
authlogic-2.1.4 test/session_test/active_record_trickery_test.rb
Empact-authlogic-2.1.4 test/session_test/active_record_trickery_test.rb
namxam-authlogic-2.1.3.1 test/session_test/active_record_trickery_test.rb
drogus-authlogic-2.1.3 test/session_test/active_record_trickery_test.rb
novelys_authlogic-2.1.6 test/session_test/active_record_trickery_test.rb
novelys_authlogic-2.1.5 test/session_test/active_record_trickery_test.rb
novelys_authlogic-2.1.4 test/session_test/active_record_trickery_test.rb
novelys_authlogic-2.1.3 test/session_test/active_record_trickery_test.rb
ginst-2009.12.8 vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb
skippy-authlogic-2.1.3 test/session_test/active_record_trickery_test.rb
ginst-2009.11.24 vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb
ginst-2009.11.23 vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb
a_b-0.1.1 vendor/authlogic/test/session_test/active_record_trickery_test.rb