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

35 lines
575 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-08-24 12:49:21 +05:30
trait :approval_required do
action { Todo::APPROVAL_REQUIRED }
end
trait :done do
state :done
end
2016-04-02 18:10:28 +05:30
end
end