提交 6ab8275c 编写于 作者: R Robert Speicher

Check symlink mode as a String for file_type_icon_class

See https://gitlab.com/gitlab-org/gitlab_git/commit/8ae14bb84b94a2ec15f8a639fb82f0f55c77ad69
上级 16a6ea2d
......@@ -40,7 +40,7 @@ module IconsHelper
def file_type_icon_class(type, mode, name)
if type == 'folder'
icon_class = 'folder'
elsif mode == 0120000
elsif mode == '120000'
icon_class = 'share'
else
# Guess which icon to choose based on file extension.
......
......@@ -7,7 +7,7 @@ describe IconsHelper do
end
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
it 'returns file-pdf-o class with .pdf' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册