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'