gitlab-org--gitlab-foss/spec/factories/todos.rb

27 lines
447 B
Ruby
Raw Normal View History

FactoryGirl.define do
2016-02-20 08:59:59 -05:00
factory :todo do
project
author
user
2016-02-18 08:51:53 -05:00
target factory: :issue
2016-02-20 08:59:59 -05:00
action { Todo::ASSIGNED }
trait :assigned do
2016-02-20 08:59:59 -05:00
action { Todo::ASSIGNED }
end
trait :mentioned do
2016-02-20 08:59:59 -05:00
action { Todo::MENTIONED }
end
trait :on_commit do
commit_id RepoHelpers.sample_commit.id
target_type "Commit"
end
trait :build_failed do
action { Todo::BUILD_FAILED }
end
end
end