Commit 6ab8275c authored by Robert Speicher's avatar Robert Speicher

Check symlink mode as a String for file_type_icon_class

See https://gitlab.com/gitlab-org/gitlab_git/commit/8ae14bb84b94a2ec15f8a639fb82f0f55c77ad69
parent 16a6ea2d
...@@ -40,7 +40,7 @@ module IconsHelper ...@@ -40,7 +40,7 @@ module IconsHelper
def file_type_icon_class(type, mode, name) def file_type_icon_class(type, mode, name)
if type == 'folder' if type == 'folder'
icon_class = 'folder' icon_class = 'folder'
elsif mode == 0120000 elsif mode == '120000'
icon_class = 'share' icon_class = 'share'
else else
# Guess which icon to choose based on file extension. # Guess which icon to choose based on file extension.
......
...@@ -7,7 +7,7 @@ describe IconsHelper do ...@@ -7,7 +7,7 @@ describe IconsHelper do
end end
it 'returns share class' do it 'returns share class' do
expect(file_type_icon_class('file', 0120000, 'link')).to eq 'share' expect(file_type_icon_class('file', '120000', 'link')).to eq 'share'
end end
it 'returns file-pdf-o class with .pdf' do it 'returns file-pdf-o class with .pdf' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment