rack-attack/spec/rack_attack_path_normalizer_spec.rb
2019-10-01 17:19:44 -03:00

19 lines
467 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