gitlab-org--gitlab-foss/spec/factories/todos.rb
Sean McGivern d3f26be6f0 Merge branch '23524-notify-automerge-user-of-failed-build' into 'master'
Notify the user who set auto-merge when merge is not possible

Closes #23524

See merge request !8056
2017-01-19 11:05:38 +00:00

39 lines
682 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 }
target factory: :merge_request
end
trait :approval_required do
action { Todo::APPROVAL_REQUIRED }
end
trait :unmergeable do
action { Todo::UNMERGEABLE }
end
trait :done do
state :done
end
end
end