Sha256: b1198f01c6091677cbea72c1b57b058510e11e45f7e6e0df21c3854b1c36719a

Contents?: true

Size: 637 Bytes

Versions: 48

Compression:

Stored size: 637 Bytes

Contents

require 'test_helper'

module Incline
  class DisableInfoTest < ActiveSupport::TestCase

    def setup
      @item = Incline::DisableInfo.new(user: incline_users(:one), reason: 'For testing')
    end

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

    test 'should require user' do
      assert_required @item, :user, nil, /must be provided/
    end

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

    test 'user must be enabled' do
      @item.user = incline_users(:disabled)
      assert_not @item.valid?
      assert @item.errors[:user].to_s =~ /must be enabled/
    end

  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

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