diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /spec/factories/diff_position.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/factories/diff_position.rb')
-rw-r--r-- | spec/factories/diff_position.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/diff_position.rb b/spec/factories/diff_position.rb index a43c5afdff4..685272acf5c 100644 --- a/spec/factories/diff_position.rb +++ b/spec/factories/diff_position.rb @@ -34,10 +34,20 @@ FactoryBot.define do position_type { 'text' } old_line { 10 } new_line { 10 } + line_range { nil } trait :added do old_line { nil } end + + trait :multi_line do + line_range do + { + start_line_code: Gitlab::Git.diff_line_code(file, 10, 10), + end_line_code: Gitlab::Git.diff_line_code(file, 12, 13) + } + end + end end factory :image_diff_position do |