diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-23 21:45:33 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-23 21:45:33 +0300 |
commit | 1f3225a5e375b370e76c98e47e8ed0b8bc67eac8 (patch) | |
tree | 0bf5d08123c48c0245713f5515e49798caaf56d6 /spec | |
parent | 788f54152be78fc1e7af01b92f83e6db00736fad (diff) | |
parent | 466adeeb56ccfa94877e8010ad127be2b244a0a6 (diff) |
Merge branch 'mk-fix-breadcrumb-order-33938' into 'master'
Fix breadcrumb order
Closes #33938
See merge request !12322
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/groups_helper_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/helpers/groups_helper_spec.rb b/spec/helpers/groups_helper_spec.rb index a7c06e577a2..84a60ce13fc 100644 --- a/spec/helpers/groups_helper_spec.rb +++ b/spec/helpers/groups_helper_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe GroupsHelper do + include ApplicationHelper + describe 'group_icon' do avatar_file_path = File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif') @@ -81,4 +83,15 @@ describe GroupsHelper do end end end + + describe 'group_title' do + let(:group) { create(:group) } + let(:nested_group) { create(:group, parent: group) } + let(:deep_nested_group) { create(:group, parent: nested_group) } + let!(:very_deep_nested_group) { create(:group, parent: deep_nested_group) } + + it 'outputs the groups in the correct order' do + expect(group_title(very_deep_nested_group)).to match(/>#{group.name}<\/a>.*>#{nested_group.name}<\/a>.*>#{deep_nested_group.name}<\/a>/) + end + end end |