diff options
author | Phil Hughes <me@iamphill.com> | 2018-01-08 13:45:56 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-01-09 14:29:57 +0300 |
commit | 500a3de7b4be05b797c9da6c6d535a4edf65db5e (patch) | |
tree | 2de351a7640ba3ebc4db3b3f67ef08a2ad7f8bd5 /spec | |
parent | 82e2d90b519e76fe6d73f791f610da1a425e6091 (diff) |
Fix changes dropdown ellipsis working across browsers
Closes #41561
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/diff_helper_spec.rb | 10 |
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 |