parent
e610b41e24
commit
b4e682eedd
3 changed files with 27 additions and 0 deletions
|
@ -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)
|
||||
|
|
5
changelogs/unreleased/50180-fa-icon-google-audit.yml
Normal file
5
changelogs/unreleased/50180-fa-icon-google-audit.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Show google icon in audit log
|
||||
merge_request:
|
||||
author: Jan Beckmann
|
||||
type: fixed
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue