Sha256: feb8aabe1aba205b4d1f850a1300858fdef63a26d35482607db5d1c78588367b
Contents?: true
Size: 663 Bytes
Versions: 6
Compression:
Stored size: 663 Bytes
Contents
require 'test_helper' module ActsAsAuthenticTest class MagicColumnsTest < ActiveSupport::TestCase def test_validates_numericality_of_login_count u = User.new u.login_count = -1 refute u.valid? refute u.errors[:login_count].empty? u.login_count = 0 refute u.valid? assert u.errors[:login_count].empty? end def test_validates_numericality_of_failed_login_count u = User.new u.failed_login_count = -1 refute u.valid? refute u.errors[:failed_login_count].empty? u.failed_login_count = 0 refute u.valid? assert u.errors[:failed_login_count].empty? end end end
Version data entries
6 entries across 6 versions & 1 rubygems