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:
authorSean McGivern <sean@mcgivern.me.uk>2018-01-09 17:57:31 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-01-09 17:57:31 +0300
commit8de1bb9e74a00766c663b1cdf8c7b49ddc060caf (patch)
treed3827f42e4b1bfc16e5a2bdba2844c01466e73a8 /spec
parent678a00d60a21fcd39fa5c8043fadc4a94e618f4d (diff)
parent500a3de7b4be05b797c9da6c6d535a4edf65db5e (diff)
Merge branch 'changes-dropdown-ellipsis' into 'master'
Fix changes dropdown ellipsis working across browsers Closes #41561 and #41684 See merge request gitlab-org/gitlab-ce!16281
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/diff_helper_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb
index f9c31ac61d8..15cbe36ae76 100644
--- a/spec/helpers/diff_helper_spec.rb
+++ b/spec/helpers/diff_helper_spec.rb
@@ -266,4 +266,14 @@ describe DiffHelper do
end
end
end
+
+ context '#diff_file_path_text' do
+ it 'returns full path by default' do
+ expect(diff_file_path_text(diff_file)).to eq(diff_file.new_path)
+ end
+
+ it 'returns truncated path' do
+ expect(diff_file_path_text(diff_file, max: 10)).to eq("...open.rb")
+ end
+ end
end