diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 12:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 12:09:48 +0300 |
commit | 03409cccee9b1cd8104484077338790add355c7d (patch) | |
tree | 82b4fbbb96d82f235dd1f76f155cd01a1a52d22a /spec/factories/draft_note.rb | |
parent | 93f77228e32908b64ce7b9a3eb69e48efff11a9c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/draft_note.rb')
-rw-r--r-- | spec/factories/draft_note.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/factories/draft_note.rb b/spec/factories/draft_note.rb index 67a3377a39f..cde8831f169 100644 --- a/spec/factories/draft_note.rb +++ b/spec/factories/draft_note.rb @@ -9,17 +9,30 @@ FactoryBot.define do transient do line_number { 14 } diff_refs { merge_request.try(:diff_refs) } + path { "files/ruby/popen.rb" } end position do Gitlab::Diff::Position.new( - old_path: "files/ruby/popen.rb", - new_path: "files/ruby/popen.rb", + old_path: path, + new_path: path, old_line: nil, new_line: line_number, diff_refs: diff_refs ) end + + factory :draft_note_on_image_diff do + transient do + path { "files/images/any_image.png" } + end + + position do + association(:image_diff_position, + file: path, + diff_refs: diff_refs) + end + end end factory :draft_note_on_discussion, traits: [:on_discussion] |