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