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