diff options
Diffstat (limited to 'spec/factories/labels.rb')
-rw-r--r-- | spec/factories/labels.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/factories/labels.rb b/spec/factories/labels.rb index 5ba8443c62c..22c2a1f15e2 100644 --- a/spec/factories/labels.rb +++ b/spec/factories/labels.rb @@ -1,7 +1,10 @@ FactoryGirl.define do - factory :label, class: ProjectLabel do - sequence(:title) { |n| "label#{n}" } + trait :base_label do + title { generate(:label_title) } color "#990000" + end + + factory :label, traits: [:base_label], class: ProjectLabel do project factory: :empty_project transient do @@ -15,9 +18,7 @@ FactoryGirl.define do end end - factory :group_label, class: GroupLabel do - sequence(:title) { |n| "label#{n}" } - color "#990000" + factory :group_label, traits: [:base_label] do group end end |