debian-mirror-gitlab/spec/factories/badge.rb

17 lines
349 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-27 19:54:05 +05:30
FactoryBot.define do
trait :base_badge do
link_url { generate(:url) }
image_url { generate(:url) }
end
2020-03-09 13:42:32 +05:30
factory :project_badge, traits: [:base_badge], class: 'ProjectBadge' do
2018-03-27 19:54:05 +05:30
project
end
2020-03-09 13:42:32 +05:30
factory :group_badge, aliases: [:badge], traits: [:base_badge], class: 'GroupBadge' do
2018-03-27 19:54:05 +05:30
group
end
end