diff options
Diffstat (limited to 'spec/factories/issues.rb')
-rw-r--r-- | spec/factories/issues.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/factories/issues.rb b/spec/factories/issues.rb new file mode 100644 index 00000000000..722095de590 --- /dev/null +++ b/spec/factories/issues.rb @@ -0,0 +1,18 @@ +FactoryGirl.define do + factory :issue do + title + author + project + + trait :closed do + state :closed + end + + trait :reopened do + state :reopened + end + + factory :closed_issue, traits: [:closed] + factory :reopened_issue, traits: [:reopened] + end +end |