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