diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 21:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 21:09:00 +0300 |
commit | eb1f5a3e087b7d6a3e85f2724b5a475cc9d9d37d (patch) | |
tree | d572a6d931152ae0dd10427237f5811893438552 /spec/factories/notes.rb | |
parent | b304a72312465ed4c0a568ee6a6ea5e97f705c9b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb index ec89a5904f5..848590efabc 100644 --- a/spec/factories/notes.rb +++ b/spec/factories/notes.rb @@ -58,24 +58,20 @@ FactoryBot.define do end position do - Gitlab::Diff::Position.new( - old_path: "files/ruby/popen.rb", - new_path: "files/ruby/popen.rb", - old_line: nil, - new_line: line_number, - diff_refs: diff_refs - ) + build(:text_diff_position, + file: "files/ruby/popen.rb", + old_line: nil, + new_line: line_number, + diff_refs: diff_refs) end trait :folded_position do position do - Gitlab::Diff::Position.new( - old_path: "files/ruby/popen.rb", - new_path: "files/ruby/popen.rb", - old_line: 1, - new_line: 1, - diff_refs: diff_refs - ) + build(:text_diff_position, + file: "files/ruby/popen.rb", + old_line: 1, + new_line: 1, + diff_refs: diff_refs) end end @@ -86,16 +82,9 @@ FactoryBot.define do factory :image_diff_note_on_merge_request do position do - Gitlab::Diff::Position.new( - old_path: "files/images/any_image.png", - new_path: "files/images/any_image.png", - width: 10, - height: 10, - x: 1, - y: 1, - diff_refs: diff_refs, - position_type: "image" - ) + build(:image_diff_position, + file: "files/images/any_image.png", + diff_refs: diff_refs) end end end @@ -109,9 +98,8 @@ FactoryBot.define do end position do - Gitlab::Diff::Position.new( - old_path: "files/ruby/popen.rb", - new_path: "files/ruby/popen.rb", + build(:text_diff_position, + file: "files/ruby/popen.rb", old_line: nil, new_line: line_number, diff_refs: diff_refs |