Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-03-21 19:43:54 +0300
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-03-25 13:53:37 +0300
commitb223a103fa36efe553e37396dfb5ff2cab095876 (patch)
treea7d69e14936b65109e93aab931992f83084c0f2e /spec
parent5c67aeaf5ab5dfbbca9d919ec4f958233ea593d8 (diff)
Merge branch '59147-duplicate-match-line' into 'master'
Fix duplicated bottom match line Closes #59147 See merge request gitlab-org/gitlab-ce!26402 (cherry picked from commit 7d3c5d882c1ddb7a78241e326996f30d67fce4b8) 8723f292 Fix diff bottom expand button appears twice
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/diff/file_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/file_spec.rb b/spec/lib/gitlab/diff/file_spec.rb
index 611c3e946ed..cc36060f864 100644
--- a/spec/lib/gitlab/diff/file_spec.rb
+++ b/spec/lib/gitlab/diff/file_spec.rb
@@ -72,6 +72,13 @@ describe Gitlab::Diff::File do
expect(diff_file.diff_lines_for_serializer.last.type).to eq('match')
end
+ context 'when called multiple times' do
+ it 'only adds bottom match line once' do
+ expect(diff_file.diff_lines_for_serializer.size).to eq(31)
+ expect(diff_file.diff_lines_for_serializer.size).to eq(31)
+ end
+ end
+
context 'when deleted' do
let(:commit) { project.commit('d59c60028b053793cecfb4022de34602e1a9218e') }
let(:diff_file) { commit.diffs.diff_file_with_old_path('files/js/commit.js.coffee') }