Sha256: 37b40f96e5af031e375f4aa91ccb2540f3dee5cdf035aabfeeb0a177beebb6af

Contents?: true

Size: 680 Bytes

Versions: 48

Compression:

Stored size: 680 Bytes

Contents

require 'test_helper'

module Incline
  class UserLoginHistoryTest < ActiveSupport::TestCase
    def setup
      @user = incline_users(:one)
      @item = Incline::UserLoginHistory.new(user: @user, ip_address: '1.2.3.4')
    end

    test 'should be valid' do
      assert @item.valid?
    end

    test 'should require user' do
      assert_required @item, :user
    end

    test 'should require ip_address' do
      assert_required @item, :ip_address
    end

    test 'should validate ip_address' do
      assert_ip_validation @item, :ip_address, :deny_mask
    end

    test 'message should not be too long' do
      assert_max_length @item, :message, 200
    end

  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
incline-0.3.14 test/models/incline/user_login_history_test.rb
incline-0.3.13 test/models/incline/user_login_history_test.rb
incline-0.3.12 test/models/incline/user_login_history_test.rb
incline-0.3.11 test/models/incline/user_login_history_test.rb
incline-0.3.10 test/models/incline/user_login_history_test.rb
incline-0.3.9 test/models/incline/user_login_history_test.rb
incline-0.3.8 test/models/incline/user_login_history_test.rb
incline-0.3.7 test/models/incline/user_login_history_test.rb
incline-0.3.6 test/models/incline/user_login_history_test.rb
incline-0.3.5 test/models/incline/user_login_history_test.rb
incline-0.3.4 test/models/incline/user_login_history_test.rb
incline-0.3.3 test/models/incline/user_login_history_test.rb
incline-0.3.2 test/models/incline/user_login_history_test.rb
incline-0.3.1 test/models/incline/user_login_history_test.rb
incline-0.3.0 test/models/incline/user_login_history_test.rb
incline-0.2.36 test/models/incline/user_login_history_test.rb
incline-0.2.35 test/models/incline/user_login_history_test.rb
incline-0.2.34 test/models/incline/user_login_history_test.rb
incline-0.2.28 test/models/incline/user_login_history_test.rb
incline-0.2.27 test/models/incline/user_login_history_test.rb