diff options
author | Jamie Schembri <jamie@schembri.me> | 2018-07-23 12:39:03 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-23 12:39:03 +0300 |
commit | f97e532eaaf0e22324a98095021f8b40f673f3ea (patch) | |
tree | 3943094c7afa29e4e8893046e2c6cd6aa50eb34f /spec | |
parent | 6d5edce815c30160abfc9775be14bbfa1eab279e (diff) |
Fix #47379 - Project visibility tooltip
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/visibility_level_helper_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb index 5077c89d7b4..a3be222b7bd 100644 --- a/spec/helpers/visibility_level_helper_spec.rb +++ b/spec/helpers/visibility_level_helper_spec.rb @@ -6,6 +6,29 @@ describe VisibilityLevelHelper do let(:personal_snippet) { build(:personal_snippet) } let(:project_snippet) { build(:project_snippet) } + describe 'visibility_icon_description' do + context 'used with a Project' do + it 'delegates projects to #project_visibility_icon_description' do + expect(visibility_icon_description(project)) + .to match /project/i + end + + context 'used with a ProjectPresenter' do + it 'delegates projects to #project_visibility_icon_description' do + expect(visibility_icon_description(project.present)) + .to match /project/i + end + end + + context 'used with a Group' do + it 'delegates groups to #group_visibility_icon_description' do + expect(visibility_icon_description(group)) + .to match /group/i + end + end + end + end + describe 'visibility_level_description' do context 'used with a Project' do it 'delegates projects to #project_visibility_level_description' do |