diff options
Diffstat (limited to 'spec/serializers/group_link/group_group_link_entity_spec.rb')
-rw-r--r-- | spec/serializers/group_link/group_group_link_entity_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/serializers/group_link/group_group_link_entity_spec.rb b/spec/serializers/group_link/group_group_link_entity_spec.rb index 8f31c53e841..c1ee92e55ba 100644 --- a/spec/serializers/group_link/group_group_link_entity_spec.rb +++ b/spec/serializers/group_link/group_group_link_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe GroupLink::GroupGroupLinkEntity do +RSpec.describe GroupLink::GroupGroupLinkEntity, feature_category: :groups_and_projects do include_context 'group_group_link' let_it_be(:current_user) { create(:user) } @@ -17,6 +17,10 @@ RSpec.describe GroupLink::GroupGroupLinkEntity do expect(entity.to_json).to match_schema('group_link/group_group_link') end + it 'correctly exposes `valid_roles`' do + expect(entity.as_json[:valid_roles]).to include(Gitlab::Access.options_with_owner) + end + context 'source' do it 'exposes `source`' do expect(as_json[:source]).to include( @@ -59,7 +63,7 @@ RSpec.describe GroupLink::GroupGroupLinkEntity do allow(entity).to receive(:direct_member?).and_return(false) end - it 'exposes `can_update` and `can_remove` as `true`' do + it 'exposes `can_update` and `can_remove` as `false`' do expect(as_json[:can_update]).to be false expect(as_json[:can_remove]).to be false end |