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

35 lines
575 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
2016-03-11 14:04:42 -05:00
2016-07-11 06:02:11 -04:00
trait :approval_required do
action { Todo::APPROVAL_REQUIRED }
end
2016-03-11 14:04:42 -05:00
trait :done do
state :done
end
end
end