summaryrefslogtreecommitdiff
path: root/spec/rubocop/cop/put_group_routes_under_scope_spec.rb
diff options
context:
space:
mode:
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.rb14
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