debian-mirror-gitlab/spec/factories/todos.rb

27 lines
447 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
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
2016-06-02 11:05:42 +05:30
trait :on_commit do
commit_id RepoHelpers.sample_commit.id
target_type "Commit"
end
trait :build_failed do
action { Todo::BUILD_FAILED }
end
2016-04-02 18:10:28 +05:30
end
end