diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 15:10:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 15:10:35 +0300 |
commit | 4fa04f789e6fed5f0dfeafe718eeb7f56a5086e9 (patch) | |
tree | 5ef2d1d8232d3bd359ec79bf95c9a35ce650ae0b /spec/rubocop/cop/put_group_routes_under_scope_spec.rb | |
parent | 4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop/cop/put_group_routes_under_scope_spec.rb')
-rw-r--r-- | spec/rubocop/cop/put_group_routes_under_scope_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/rubocop/cop/put_group_routes_under_scope_spec.rb b/spec/rubocop/cop/put_group_routes_under_scope_spec.rb index c55d9bf22d6..888d1b6a2ba 100644 --- a/spec/rubocop/cop/put_group_routes_under_scope_spec.rb +++ b/spec/rubocop/cop/put_group_routes_under_scope_spec.rb @@ -46,4 +46,18 @@ RSpec.describe RuboCop::Cop::PutGroupRoutesUnderScope, type: :rubocop do end PATTERN end + + it 'does not register an offense for the root route' do + expect_no_offenses(<<~PATTERN) + get '/' + PATTERN + end + + it 'does not register an offense for the root route within scope' do + expect_no_offenses(<<~PATTERN) + scope(path: 'groups/*group_id/-', module: :groups) do + get '/' + end + PATTERN + end end |