diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-05 16:36:06 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-19 02:38:17 +0300 |
commit | d6b11dafd37e78c12c982c42f274928293cdfa53 (patch) | |
tree | e20c62bc3b11b77e366bce2251146d5f5ec86e0c /spec/factories/notes.rb | |
parent | 270dc22658424ee7f279db99e56c6fc69acd3eb7 (diff) |
Support notes without project
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index a10ba629760..476f2a37793 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -13,6 +13,7 @@ FactoryGirl.define do factory :note_on_issue, traits: [:on_issue], aliases: [:votable_note] factory :note_on_merge_request, traits: [:on_merge_request] factory :note_on_project_snippet, traits: [:on_project_snippet] + factory :note_on_personal_snippet, traits: [:on_personal_snippet] factory :system_note, traits: [:system] factory :legacy_diff_note_on_commit, traits: [:on_commit, :legacy_diff_note], class: LegacyDiffNote @@ -70,6 +71,11 @@ FactoryGirl.define do noteable { create(:project_snippet, project: project) } end + trait :on_personal_snippet do + noteable { create(:personal_snippet) } + project nil + end + trait :system do system true end |