Skip to content

Commit c4ab8aa

Browse files
committed
Add a regression spec for Rails/HttpStatus
Follow up rubocop#829.
1 parent aa4ab80 commit c4ab8aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/rubocop/cop/rails/http_status_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
head 550
6161
RUBY
6262
end
63+
64+
it 'does not register an offense when using numeric value for `redirect`' do
65+
expect_no_offenses(<<~RUBY)
66+
get '/foobar', to: redirect('/foobar/baz', status: 301)
67+
RUBY
68+
end
6369
end
6470

6571
context 'when EnforcedStyle is `numeric`' do

0 commit comments

Comments
 (0)