2016-02-15 22:26:30 +00:00
|
|
|
FactoryGirl.define do
|
2016-02-20 13:59:59 +00:00
|
|
|
factory :todo do
|
2016-02-15 22:26:30 +00:00
|
|
|
project
|
|
|
|
author
|
|
|
|
user
|
2016-02-18 13:51:53 +00:00
|
|
|
target factory: :issue
|
2016-02-20 13:59:59 +00:00
|
|
|
action { Todo::ASSIGNED }
|
2016-02-16 02:26:33 +00:00
|
|
|
|
2016-02-17 22:04:14 +00:00
|
|
|
trait :assigned do
|
2016-02-20 13:59:59 +00:00
|
|
|
action { Todo::ASSIGNED }
|
2016-02-16 02:26:33 +00:00
|
|
|
end
|
|
|
|
|
2016-02-17 22:04:14 +00:00
|
|
|
trait :mentioned do
|
2016-02-20 13:59:59 +00:00
|
|
|
action { Todo::MENTIONED }
|
2016-02-16 02:26:33 +00:00
|
|
|
end
|
2016-03-16 23:31:30 +00:00
|
|
|
|
|
|
|
trait :on_commit do
|
|
|
|
commit_id RepoHelpers.sample_commit.id
|
|
|
|
target_type "Commit"
|
|
|
|
end
|
2016-03-08 18:22:50 +00:00
|
|
|
|
|
|
|
trait :build_failed do
|
|
|
|
action { Todo::BUILD_FAILED }
|
|
|
|
end
|
2016-02-15 22:26:30 +00:00
|
|
|
end
|
|
|
|
end
|