Sha256: 0a1621ee6d47b066b72a56be66d5a08f6ef53dc73e82366023a5ec26370b7f65

Contents?: true

Size: 700 Bytes

Versions: 13

Compression:

Stored size: 700 Bytes

Contents

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

module ActsAsAuthenticTest
  class MagicColumnsTest < ActiveSupport::TestCase
    def test_validates_numericality_of_login_count
      u = User.new
      u.login_count = -1
      assert !u.valid?
      assert u.errors.on(:login_count)
      
      u.login_count = 0
      assert !u.valid?
      assert !u.errors.on(:login_count)
    end
    
    def test_validates_numericality_of_failed_login_count
      u = User.new
      u.failed_login_count = -1
      assert !u.valid?
      assert u.errors.on(:failed_login_count)
      
      u.failed_login_count = 0
      assert !u.valid?
      assert !u.errors.on(:failed_login_count)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
authlogic-2.0.11 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.0 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.1 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.13 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.12 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.8 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.4 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.5 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.2 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.3 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.6 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.7 test/acts_as_authentic_test/magic_columns_test.rb
authlogic-2.0.9 test/acts_as_authentic_test/magic_columns_test.rb