Commit e23229e4 authored by Terence Lee's avatar Terence Lee

add custom redirect test

parent 6fbbcf65
{
"redirects": {
"/old/gone": {
"url": "/",
"status": 302
}
}
}
......@@ -59,4 +59,14 @@ RSpec.describe "Simple" do
expect(response.body.chomp).to eq("hello from route")
end
end
describe "redirects" do
let(:name) { "redirects" }
it "should redirect and respect the http code" do
response = app.get("/old/gone")
expect(response.code).to eq("302")
expect(response["location"]).to eq("http://#{AppRunner::HOST_IP}:#{AppRunner::HOST_PORT}/")
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment