diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-03-05 20:51:40 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-03-05 20:51:40 +0300 |
commit | 8fe880dc064e0e6cd10f7176ade7c312cfb37b90 (patch) | |
tree | fd52091357726e167d27690e5d1e99a981e1821d /spec/factories/badge.rb | |
parent | 49f72d06654bd7bdea259154e1092a53aab57acc (diff) |
Projects and groups badges API
Diffstat (limited to 'spec/factories/badge.rb')
-rw-r--r-- | spec/factories/badge.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/factories/badge.rb b/spec/factories/badge.rb new file mode 100644 index 00000000000..b87ece946cb --- /dev/null +++ b/spec/factories/badge.rb @@ -0,0 +1,14 @@ +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 |