2016-02-16 22:55:24 -05:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :event do
|
2017-01-24 20:30:56 -05:00
|
|
|
project factory: :empty_project
|
2016-09-19 22:59:29 -04:00
|
|
|
author factory: :user
|
|
|
|
|
2017-01-29 17:37:24 -05:00
|
|
|
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 }
|
|
|
|
|
2016-02-16 22:55:24 -05:00
|
|
|
factory :closed_issue_event do
|
|
|
|
action { Event::CLOSED }
|
|
|
|
target factory: :closed_issue
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|