diff options
author | Martin Nowak <code@dawg.eu> | 2017-12-06 19:10:53 +0100 |
---|---|---|
committer | Martin Nowak <code@dawg.eu> | 2017-12-07 20:19:37 +0100 |
commit | b7a5125f02865637ffbd4d7f8a623c994b861f0e (patch) | |
tree | baba27d1d0e839931f3b995fd6acd2dafe7c4f50 /spec | |
parent | f1a98477014ceee1738a6994da9fd17dd4ccea00 (diff) | |
download | gitlab-ce-b7a5125f02865637ffbd4d7f8a623c994b861f0e.tar.gz |
fix #39233 - 500 in merge request
- handle unchanged empty lines in inline diff
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/diff/inline_diff_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/inline_diff_spec.rb b/spec/lib/gitlab/diff/inline_diff_spec.rb index 15451c2cf99..0a41362f606 100644 --- a/spec/lib/gitlab/diff/inline_diff_spec.rb +++ b/spec/lib/gitlab/diff/inline_diff_spec.rb @@ -31,6 +31,10 @@ describe Gitlab::Diff::InlineDiff do expect(subject[7]).to eq([17..17]) expect(subject[8]).to be_nil end + + it 'can handle unchanged empty lines' do + expect { described_class.for_lines(['- bar', '+ baz', '']) }.not_to raise_error + end end describe "#inline_diffs" do |