summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2015-12-30 21:44:12 -0500
committerRubén Dávila <rdavila84@gmail.com>2015-12-30 21:44:12 -0500
commitfd100e1ef1726418c81ab8833cf8bcf86fab6eef (patch)
tree22284ca91f52d9042479d14a89101092ab281b12 /spec/lib
parent8b079315d98a8ccf852592148632c6f052d9cb55 (diff)
downloadgitlab-ce-fd100e1ef1726418c81ab8833cf8bcf86fab6eef.tar.gz
Don't modify "match" diff lines. #3945
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/diff/highlight_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/highlight_spec.rb b/spec/lib/gitlab/diff/highlight_spec.rb
index 80083c15cff..54621f773d7 100644
--- a/spec/lib/gitlab/diff/highlight_spec.rb
+++ b/spec/lib/gitlab/diff/highlight_spec.rb
@@ -24,5 +24,10 @@ describe Gitlab::Diff::Highlight, lib: true do
it 'should keep the inline diff markup' do
expect(diff_lines[5].text).to match(Regexp.new(Regexp.escape('<span class="idiff">RuntimeError, </span>')))
end
+
+ it 'should not modify "match" lines' do
+ expect(diff_lines[0].text).to eq('@@ -6,12 +6,18 @@ module Popen')
+ expect(diff_lines[22].text).to eq('@@ -19,6 +25,7 @@ module Popen')
+ end
end
end