role_group_spec.rb 467 B

123456789101112131415161718192021
  1. require 'rails_helper'
  2. require 'models/concerns/has_group_relation_definition_examples'
  3. RSpec.describe RoleGroup do
  4. let!(:group_relation_instance) { create(:role) }
  5. it_behaves_like 'HasGroupRelationDefinition'
  6. it 'prevents roles from beeing in Group assets' do
  7. group = create(:group)
  8. described_class.create!(
  9. group: group,
  10. role: create(:role)
  11. )
  12. expect(group.assets({})[:Group][group.id]).not_to include('role_ids')
  13. end
  14. end