diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/lib/api/entities/public_group_details_spec.rb | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/lib/api/entities/public_group_details_spec.rb')
-rw-r--r-- | spec/lib/api/entities/public_group_details_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/api/entities/public_group_details_spec.rb b/spec/lib/api/entities/public_group_details_spec.rb new file mode 100644 index 00000000000..34162ed00ca --- /dev/null +++ b/spec/lib/api/entities/public_group_details_spec.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe API::Entities::PublicGroupDetails do + subject(:entity) { described_class.new(group) } + + let(:group) { create(:group, :with_avatar) } + + describe '#as_json' do + subject { entity.as_json } + + it 'includes public group fields' do + is_expected.to eq( + id: group.id, + name: group.name, + web_url: group.web_url, + avatar_url: group.avatar_url(only_path: false), + full_name: group.full_name, + full_path: group.full_path + ) + end + end +end |