diff options
Diffstat (limited to 'spec/routing/routing_spec.rb')
-rw-r--r-- | spec/routing/routing_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index a45839b16f5..407d19c3b2a 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -285,17 +285,15 @@ end describe "Groups", "routing" do let(:name) { 'complex.group-namegit' } - - before do - allow_any_instance_of(GroupUrlConstrainer).to receive(:matches?).and_return(true) - end + let!(:group) { create(:group, name: name) } it "to #show" do expect(get("/groups/#{name}")).to route_to('groups#show', id: name) end it "also supports nested groups" do - expect(get("/#{name}/#{name}")).to route_to('groups#show', id: "#{name}/#{name}") + nested_group = create(:group, parent: group) + expect(get("/#{name}/#{nested_group.name}")).to route_to('groups#show', id: "#{name}/#{nested_group.name}") end it "also display group#show on the short path" do @@ -313,10 +311,6 @@ describe "Groups", "routing" do it "to #members" do expect(get("/groups/#{name}/group_members")).to route_to('groups/group_members#index', group_id: name) end - - it "also display group#show with slash in the path" do - expect(get('/group/subgroup')).to route_to('groups#show', id: 'group/subgroup') - end end describe HealthCheckController, 'routing' do |