summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-01-08 10:45:56 +0000
committerPhil Hughes <me@iamphill.com>2018-01-09 11:29:57 +0000
commit500a3de7b4be05b797c9da6c6d535a4edf65db5e (patch)
tree2de351a7640ba3ebc4db3b3f67ef08a2ad7f8bd5 /spec/helpers
parent82e2d90b519e76fe6d73f791f610da1a425e6091 (diff)
downloadgitlab-ce-500a3de7b4be05b797c9da6c6d535a4edf65db5e.tar.gz
Fix changes dropdown ellipsis working across browserschanges-dropdown-ellipsis
Closes #41561
Diffstat (limited to 'spec/helpers')
-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