summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorJan Beckmann <king-jan1999@hotmail.de>2018-08-14 21:12:07 +0200
committerJan Beckmann <king-jan1999@hotmail.de>2018-08-14 21:42:42 +0200
commitb4e682eedd6b58f3f245fc1450675909fa0fa5de (patch)
treecc09a96a146292579623aadec8069f6607c6cdb3 /spec/helpers
parente610b41e2458601fb1821dcf46a15dc758e032bd (diff)
downloadgitlab-ce-b4e682eedd6b58f3f245fc1450675909fa0fa5de.tar.gz
Fix missing Google icon in audit log
Fixes #50180
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/icons_helper_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/icons_helper_spec.rb b/spec/helpers/icons_helper_spec.rb
index 82f588d1a08..e59f9a7bbe2 100644
--- a/spec/helpers/icons_helper_spec.rb
+++ b/spec/helpers/icons_helper_spec.rb
@@ -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'