rack-attack/spec/rack_attack_path_normalizer_spec.rb
2018-06-28 17:08:15 -03:00

19 lines
461 B
Ruby

# frozen_string_literal: true
require_relative 'spec_helper'
describe Rack::Attack::PathNormalizer do
subject { Rack::Attack::PathNormalizer }
it 'should have a normalize_path method' do
subject.normalize_path('/foo').must_equal '/foo'
end
describe 'FallbackNormalizer' do
subject { Rack::Attack::FallbackPathNormalizer }
it '#normalize_path does not change the path' do
subject.normalize_path('').must_equal ''
end
end
end