summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-06-20 14:35:55 -0700
committerMichael Kozono <mkozono@gmail.com>2017-06-22 13:38:29 -0700
commitdaef4087127747d4bf13fc05d3c39f9a7cd72c01 (patch)
tree62d4b63c8e03ee2a8516228b0da858dc248115a8 /spec/helpers
parentbf0b3d835211077cb10ee3aec9ee6e0bca2304b6 (diff)
downloadgitlab-ce-daef4087127747d4bf13fc05d3c39f9a7cd72c01.tar.gz
Fix breadcrumb order
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/groups_helper_spec.rb13
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