gitlab-org--gitlab-foss/spec/factories/todos.rb
Douglas Barbosa Alexandre a1f224d3f7 Add Todos API
2016-07-01 10:49:34 +02:00

30 lines
493 B
Ruby

FactoryGirl.define do
factory :todo do
project
author
user
target factory: :issue
action { Todo::ASSIGNED }
trait :assigned do
action { Todo::ASSIGNED }
end
trait :mentioned do
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
trait :done do
state :done
end
end
end