Commit 89e53e4a authored by Stan Hu's avatar Stan Hu

Merge branch '50180-fa-icon-google-audit' into 'master'

Resolve "Profile audit log does not show Google icon properly"

Closes #50180

See merge request gitlab-org/gitlab-ce!21207
parents 6343964b c0d1d461
......@@ -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)
......
---
title: Show google icon in audit log
merge_request: 21207
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'
......
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