From e48a1755f42eabb2f459028d10d2d6c1160af4af Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Sun, 29 Jan 2017 17:37:24 -0500 Subject: Add traits for the different Event types to the Event factory --- spec/factories/events.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spec/factories/events.rb') 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 -- cgit v1.2.1