Fix missing Google icon in audit log

Fixes #50180
This commit is contained in:
Jan Beckmann 2018-08-14 21:12:07 +02:00
parent e610b41e24
commit b4e682eedd
No known key found for this signature in database
GPG Key ID: 3090E00AAFF37325
3 changed files with 27 additions and 0 deletions

View File

@ -62,6 +62,8 @@ module IconsHelper
names = "key"
when "two-factor"
names = "key"
when "google_oauth2"
names = "google"
end
options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options)

View File

@ -0,0 +1,5 @@
---
title: Show google icon in audit log
merge_request:
author: Jan Beckmann
type: fixed

View File

@ -80,6 +80,26 @@ describe IconsHelper do
end
end
describe 'audit icon' do
it 'returns right icon name for standard auth' do
icon_name = 'standard'
expect(audit_icon(icon_name).to_s)
.to eq '<i class="fa fa-key"></i>'
end
it 'returns right icon name for two-factor auth' do
icon_name = 'two-factor'
expect(audit_icon(icon_name).to_s)
.to eq '<i class="fa fa-key"></i>'
end
it 'returns right icon name for google_oauth2 auth' do
icon_name = 'google_oauth2'
expect(audit_icon(icon_name).to_s)
.to eq '<i class="fa fa-google"></i>'
end
end
describe 'file_type_icon_class' do
it 'returns folder class' do
expect(file_type_icon_class('folder', 0, 'folder_name')).to eq 'folder'