diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/factories/notes.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index 7c3ba122b5a..52e91f31ec1 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -17,17 +17,13 @@ FactoryBot.define do factory :note_on_project_snippet, traits: [:on_project_snippet] factory :note_on_personal_snippet, traits: [:on_personal_snippet] factory :note_on_design, traits: [:on_design] + factory :note_on_alert, traits: [:on_alert] factory :system_note, traits: [:system] factory :discussion_note, class: 'DiscussionNote' factory :discussion_note_on_merge_request, traits: [:on_merge_request], class: 'DiscussionNote' do association :project, :repository - - trait :resolved do - resolved_at { Time.now } - resolved_by { create(:user) } - end end factory :track_mr_picking_note, traits: [:on_merge_request, :system] do @@ -76,11 +72,6 @@ FactoryBot.define do end end - trait :resolved do - resolved_at { Time.now } - resolved_by { create(:user) } - end - factory :image_diff_note_on_merge_request do position do build(:image_diff_position, @@ -155,6 +146,15 @@ FactoryBot.define do end end + trait :on_alert do + noteable { association(:alert_management_alert, project: project) } + end + + trait :resolved do + resolved_at { Time.now } + resolved_by { association(:user) } + end + trait :system do system { true } end @@ -183,6 +183,10 @@ FactoryBot.define do confidential { true } end + trait :with_review do + review + end + transient do in_reply_to { nil } end |