Sha256: 3f67b40ebebaa8f4d3a377fb42b4f6081980070cc210a75dfcb843b924589553

Contents?: true

Size: 481 Bytes

Versions: 1

Compression:

Stored size: 481 Bytes

Contents

require 'test_helper'

class RedirectTest < ActionDispatch::IntegrationTest
  test "redirect and remove trailing slash" do
    get '/dummy/'
    assert_redirected_to '/dummy'
  end

  test "redirect and remove trailing slash while retaining query params" do
    get '/dummy/?foo=bar'
    assert_redirected_to '/dummy?foo=bar'
  end

  test "it does not redirect with multiple slashes" do
    assert_raises(ActionController::RoutingError) { get '/dummy///www.evil.com/' }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heroku_standard_config-0.0.3 test/rack_rewrite_test.rb