Commit 2a0d38c0 authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'rs-icon-symlink' into 'master'

Check symlink mode as a String for file_type_icon_class

The file mode for a symlink just got changed in `gitlab_git`, see https://gitlab.com/gitlab-org/gitlab_git/commit/8ae14bb84b94a2ec15f8a639fb82f0f55c77ad69

See merge request !487
parents 254698d6 6ab8275c
......@@ -40,7 +40,7 @@ def private_icon
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 @@
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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment