diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-29 17:37:24 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-02-01 16:02:03 -0500 |
commit | e48a1755f42eabb2f459028d10d2d6c1160af4af (patch) | |
tree | 38bced3a3d7fc55f70df01e1804260536b37f28d /spec/factories | |
parent | b525aff665f139cd12ac5a6df78d722427e759cc (diff) | |
download | gitlab-ce-e48a1755f42eabb2f459028d10d2d6c1160af4af.tar.gz |
Add traits for the different Event types to the Event factoryrs-event-traits
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/events.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/events.rb b/spec/factories/events.rb index bfe41f71b57..55727d6b62c 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -3,6 +3,18 @@ FactoryGirl.define do project factory: :empty_project author factory: :user + trait(:created) { action Event::CREATED } + trait(:updated) { action Event::UPDATED } + trait(:closed) { action Event::CLOSED } + trait(:reopened) { action Event::REOPENED } + trait(:pushed) { action Event::PUSHED } + trait(:commented) { action Event::COMMENTED } + trait(:merged) { action Event::MERGED } + trait(:joined) { action Event::JOINED } + trait(:left) { action Event::LEFT } + trait(:destroyed) { action Event::DESTROYED } + trait(:expired) { action Event::EXPIRED } + factory :closed_issue_event do action { Event::CLOSED } target factory: :closed_issue |