diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-09 17:57:31 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-09 17:57:31 +0300 |
commit | 8de1bb9e74a00766c663b1cdf8c7b49ddc060caf (patch) | |
tree | d3827f42e4b1bfc16e5a2bdba2844c01466e73a8 /spec | |
parent | 678a00d60a21fcd39fa5c8043fadc4a94e618f4d (diff) | |
parent | 500a3de7b4be05b797c9da6c6d535a4edf65db5e (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.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 |