Sha256: 1eb2dd8ff963dbd83bf47296e07aa8319587631b224277db290a9036d810bf15

Contents?: true

Size: 709 Bytes

Versions: 14

Compression:

Stored size: 709 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[:login_count].size > 0

      u.login_count = 0
      assert !u.valid?
      assert u.errors[:login_count].size == 0
    end

    def test_validates_numericality_of_failed_login_count
      u = User.new
      u.failed_login_count = -1
      assert !u.valid?
      assert u.errors[:failed_login_count].size > 0

      u.failed_login_count = 0
      assert !u.valid?
      assert u.errors[:failed_login_count].size == 0
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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