Skip to content

Commit

Permalink
Skip path normalization test unless Rails is present.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 25, 2023
1 parent 1dbeca8 commit ac5bae9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/rack_attack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
end

it 'blocks requests with trailing slash' do
if Rack::Attack::PathNormalizer == Rack::Attack::FallbackPathNormalizer
skip "Normalization is only present on Rails"
end

get '/foo/'
_(last_response.status).must_equal 403
end
Expand Down

0 comments on commit ac5bae9

Please sign in to comment.