summaryrefslogtreecommitdiff
path: root/spec/routing/group_routing_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/routing/group_routing_spec.rb')
-rw-r--r--spec/routing/group_routing_spec.rb24
1 files changed, 22 insertions, 2 deletions
diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb
index 2a8454a276d..f4d5f899519 100644
--- a/spec/routing/group_routing_spec.rb
+++ b/spec/routing/group_routing_spec.rb
@@ -2,8 +2,8 @@
require 'spec_helper'
-describe "Groups", "routing" do
- let(:group_path) { 'complex.group-namegit' }
+RSpec.shared_examples 'groups routing' do
+ let(:group_path) { 'projects.abc123' }
let!(:group) { create(:group, path: group_path) }
it "to #show" do
@@ -56,3 +56,23 @@ describe "Groups", "routing" do
expect(get('/groups/gitlabhq/-/boards')).to route_to('groups/boards#index', group_id: 'gitlabhq')
end
end
+
+RSpec.describe "Groups", "routing" do
+ context 'complex group path with dot' do
+ include_examples 'groups routing' do
+ let(:group_path) { 'complex.group-namegit' }
+ end
+ end
+
+ context 'group path starting with help' do
+ include_examples 'groups routing' do
+ let(:group_path) { 'help.abc123' }
+ end
+ end
+
+ context 'group path starting with projects' do
+ include_examples 'groups routing' do
+ let(:group_path) { 'projects.abc123' }
+ end
+ end
+end