summaryrefslogtreecommitdiff
path: root/spec/factories/badge.rb
blob: 7623797a7fa5b80383e0f8ad1d3d3890d63d121e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

FactoryBot.define do
  trait :base_badge do
    link_url { generate(:url) }
    image_url { generate(:url) }
  end

  factory :project_badge, traits: [:base_badge], class: 'ProjectBadge' do
    project
  end

  factory :group_badge, aliases: [:badge], traits: [:base_badge], class: 'GroupBadge' do
    group
  end
end