Check symlink mode as a String for file_type_icon_class

See 8ae14bb84b
This commit is contained in:
Robert Speicher 2015-04-01 23:32:16 -04:00
parent 16a6ea2d17
commit 6ab8275cd1
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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