From 500a3de7b4be05b797c9da6c6d535a4edf65db5e Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 8 Jan 2018 10:45:56 +0000 Subject: Fix changes dropdown ellipsis working across browsers Closes #41561 --- spec/helpers/diff_helper_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/helpers/diff_helper_spec.rb') 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 -- cgit v1.2.1