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.2.26 test/models/incline/disable_info_test.rb
incline-0.2.25 test/models/incline/disable_info_test.rb
incline-0.2.24 test/models/incline/disable_info_test.rb
incline-0.2.23 test/models/incline/disable_info_test.rb
incline-0.2.22 test/models/incline/disable_info_test.rb
incline-0.2.21 test/models/incline/disable_info_test.rb
incline-0.2.20 test/models/incline/disable_info_test.rb
incline-0.2.19 test/models/incline/disable_info_test.rb
incline-0.2.18 test/models/incline/disable_info_test.rb
incline-0.2.17 test/models/incline/disable_info_test.rb
incline-0.2.16 test/models/incline/disable_info_test.rb
incline-0.2.15 test/models/incline/disable_info_test.rb
incline-0.2.14 test/models/incline/disable_info_test.rb
incline-0.2.13 test/models/incline/disable_info_test.rb
incline-0.2.12 test/models/incline/disable_info_test.rb
incline-0.2.11 test/models/incline/disable_info_test.rb
incline-0.2.10 test/models/incline/disable_info_test.rb
incline-0.2.9 test/models/incline/disable_info_test.rb
incline-0.2.8 test/models/incline/disable_info_test.rb
incline-0.2.7 test/models/incline/disable_info_test.rb