From c948babf7088e26ae025c1476022699bfe9fb107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C5=82gorzata=20Ksionek?= Date: Fri, 26 Apr 2019 06:11:47 +0200 Subject: [PATCH] Add specs to group routing spec --- spec/routing/group_routing_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb index 53271550e8b..00ca394a50b 100644 --- a/spec/routing/group_routing_spec.rb +++ b/spec/routing/group_routing_spec.rb @@ -133,5 +133,19 @@ describe "Groups", "routing" do let(:resource) { create(:group, parent: parent, path: 'activity') } end end + + describe 'subgroup "boards"' do + it 'shows group show page' do + allow(Group).to receive(:find_by_full_path).with('gitlabhq/boards', any_args).and_return(true) + + expect(get('/groups/gitlabhq/boards')).to route_to('groups#show', id: 'gitlabhq/boards') + end + + it 'shows boards index page' do + allow(Group).to receive(:find_by_full_path).with('gitlabhq', any_args).and_return(true) + + expect(get('/groups/gitlabhq/-/boards')).to route_to('groups/boards#index', group_id: 'gitlabhq') + end + end end end