summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-07-23 14:13:39 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-07-23 14:13:39 +0000
commitaed076353d8a8867c9ef2d61a6fda123d07fad77 (patch)
treed3d985ad20da0f42a9ab78366c2b4a47763adc5c /spec
parentb5cc47bda6cefc1aa75e9e388f656609246ca326 (diff)
parent866bef8059591db9a17db71d66a1321b0ca25153 (diff)
downloadgitlab-ce-aed076353d8a8867c9ef2d61a6fda123d07fad77.tar.gz
Merge branch '57953-fix-unfolded-diff-suggestions' into 'master'
Fix suggestion on lines that are not part of an MR See merge request gitlab-org/gitlab-ce!30606
Diffstat (limited to 'spec')
-rw-r--r--spec/presenters/blobs/unfold_presenter_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/presenters/blobs/unfold_presenter_spec.rb b/spec/presenters/blobs/unfold_presenter_spec.rb
index 7ece5f623ce..1534c572b30 100644
--- a/spec/presenters/blobs/unfold_presenter_spec.rb
+++ b/spec/presenters/blobs/unfold_presenter_spec.rb
@@ -54,8 +54,10 @@ describe Blobs::UnfoldPresenter do
expect(lines.size).to eq(total_lines)
lines.each.with_index do |line, index|
- expect(line.text).to include("LC#{index + 1}")
- expect(line.text).to eq(line.rich_text)
+ line_number = index + 1
+
+ expect(line.text).to eq(line_number.to_s)
+ expect(line.rich_text).to include("LC#{line_number}")
expect(line.type).to be_nil
end
end