diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 21:10:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 21:10:03 +0300 |
commit | b6847c621ff246e6abceb90545d5a608318762d6 (patch) | |
tree | 460da2a6c2be2e4f5164c2bba1851b66260f850d /spec/factories/notes.rb | |
parent | c08d9c22569d1c9e7c7737e183969593394133d9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index a15c7625500..fdd1a9a18b2 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -40,7 +40,7 @@ FactoryBot.define do factory :discussion_note_on_personal_snippet, traits: [:on_personal_snippet], class: 'DiscussionNote' - factory :discussion_note_on_snippet, traits: [:on_snippet], class: 'DiscussionNote' + factory :discussion_note_on_project_snippet, traits: [:on_project_snippet], class: 'DiscussionNote' factory :legacy_diff_note_on_commit, traits: [:on_commit, :legacy_diff_note], class: 'LegacyDiffNote' @@ -120,23 +120,19 @@ FactoryBot.define do end trait :on_issue do - noteable { create(:issue, project: project) } - end - - trait :on_snippet do - noteable { create(:snippet, project: project) } + noteable { association(:issue, project: project) } end trait :on_merge_request do - noteable { create(:merge_request, source_project: project) } + noteable { association(:merge_request, source_project: project) } end trait :on_project_snippet do - noteable { create(:project_snippet, project: project) } + noteable { association(:project_snippet, project: project) } end trait :on_personal_snippet do - noteable { create(:personal_snippet) } + noteable { association(:personal_snippet) } project { nil } end |