d3f26be6f0
Notify the user who set auto-merge when merge is not possible Closes #23524 See merge request !8056
39 lines
682 B
Ruby
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
|