diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-14 22:33:25 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-08-14 22:33:25 +0000 |
commit | 89e53e4a8d5ee57691957603fff3847daa058e62 (patch) | |
tree | c40aa0751058a48cb1a63ceb2c20630520ef7ffd | |
parent | 6343964b9c7acac25d946545778c8ae6523773da (diff) | |
parent | c0d1d46134f900306853b33ad30d2fbc5bbf7522 (diff) | |
download | gitlab-ce-89e53e4a8d5ee57691957603fff3847daa058e62.tar.gz |
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
-rw-r--r-- | app/helpers/icons_helper.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/50180-fa-icon-google-audit.yml | 5 | ||||
-rw-r--r-- | spec/helpers/icons_helper_spec.rb | 20 |
3 files changed, 27 insertions, 0 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 41084ec686f..a8a10c98d69 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -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) diff --git a/changelogs/unreleased/50180-fa-icon-google-audit.yml b/changelogs/unreleased/50180-fa-icon-google-audit.yml new file mode 100644 index 00000000000..fb1771a7570 --- /dev/null +++ b/changelogs/unreleased/50180-fa-icon-google-audit.yml @@ -0,0 +1,5 @@ +--- +title: Show google icon in audit log +merge_request: 21207 +author: Jan Beckmann +type: fixed diff --git a/spec/helpers/icons_helper_spec.rb b/spec/helpers/icons_helper_spec.rb index 82f588d1a08..4b40d523287 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' |