Commit b4e682ee authored by Jan Beckmann's avatar Jan Beckmann

Fix missing Google icon in audit log

Fixes #50180
parent e610b41e
...@@ -62,6 +62,8 @@ module IconsHelper ...@@ -62,6 +62,8 @@ module IconsHelper
names = "key" names = "key"
when "two-factor" when "two-factor"
names = "key" names = "key"
when "google_oauth2"
names = "google"
end end
options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options) options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options)
......
---
title: Show google icon in audit log
merge_request:
author: Jan Beckmann
type: fixed
...@@ -80,6 +80,26 @@ describe IconsHelper do ...@@ -80,6 +80,26 @@ describe IconsHelper do
end end
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 describe 'file_type_icon_class' do
it 'returns folder class' do it 'returns folder class' do
expect(file_type_icon_class('folder', 0, 'folder_name')).to eq 'folder' expect(file_type_icon_class('folder', 0, 'folder_name')).to eq 'folder'
......
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