Welcome to mirror list, hosted at ThFree Co, Russian Federation.

public_group_details_spec.rb « entities « api « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 34162ed00ca2856a90e0a5186419be21ee1ae5fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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