debian-mirror-gitlab/spec/lib/api/entities/public_group_details_spec.rb
2021-04-17 20:07:23 +05:30

24 lines
561 B
Ruby

# 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