diff options
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index b1e7866f9ce..fcba413e802 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -18,7 +18,8 @@ FactoryBot.define do 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 :note_on_abuse_report, traits: [:on_abuse_report] + factory :system_note, traits: [:system] factory :discussion_note, class: 'DiscussionNote' @@ -39,6 +40,8 @@ FactoryBot.define do factory :discussion_note_on_project_snippet, traits: [:on_project_snippet], class: 'DiscussionNote' + factory :discussion_note_on_abuse_report, traits: [:on_abuse_report], class: 'DiscussionNote' + factory :legacy_diff_note_on_commit, traits: [:on_commit, :legacy_diff_note], class: 'LegacyDiffNote' factory :legacy_diff_note_on_merge_request, traits: [:on_merge_request, :legacy_diff_note], class: 'LegacyDiffNote' do @@ -166,6 +169,11 @@ FactoryBot.define do noteable { association(:alert_management_alert, project: project) } end + trait :on_abuse_report do + noteable { association(:abuse_report) } + project { nil } + end + trait :resolved do resolved_at { Time.now } resolved_by { association(:user) } |