summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-03 18:44:06 +0000
committerRémy Coutable <remy@rymai.me>2017-02-03 18:44:06 +0000
commit785fadf33fb23c4c95edeaa84ef5bd267ce753d5 (patch)
treec7d9235fef60da448939275b9495f47931e8d328 /spec/factories
parent538a6875d3b53f909e9b5b6ef396a457cbcae760 (diff)
parente48a1755f42eabb2f459028d10d2d6c1160af4af (diff)
downloadgitlab-ce-785fadf33fb23c4c95edeaa84ef5bd267ce753d5.tar.gz
Merge branch 'rs-event-traits' into 'master'
Add traits for the different Event types to the Event factory See merge request !8870
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/events.rb12
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