Sha256: 42208ac57d30fe9e36656b13877881c3f1859ec94ecbb805925a7c1d0e7c3781

Contents?: true

Size: 727 Bytes

Versions: 48

Compression:

Stored size: 727 Bytes

Contents

require 'test_helper'

module Incline
  class AccessGroupUserMemberTest < ActiveSupport::TestCase
    def setup
      @group1 = incline_access_groups(:one)
      @group2 = incline_access_groups(:two)
      @user = incline_users(:one)
      @item = Incline::AccessGroupUserMember.new(group_id: @group1.id, member_id: @user.id)
    end

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

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

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

    test 'member_id should be unique within group_id scope' do
      assert_uniqueness @item, :member_id, false, group_id: @group2.id
    end

  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

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