diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-16 09:09:37 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-16 09:09:37 +0000 |
commit | 513eff621044e77bc00cd1b4ae0cb5e0e7c2e77e (patch) | |
tree | 1de915ccc488a661129b410db83ad9f20a7c806c /spec/factories | |
parent | 1ab35c9208287638a097abc895738fbc0c0860e6 (diff) | |
download | gitlab-ce-513eff621044e77bc00cd1b4ae0cb5e0e7c2e77e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-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 |