Sha256: 71eba0dd79b889e943efe6a54dad522235568a1355e6494f3e017f7024d2130d
Contents?: true
Size: 415 Bytes
Versions: 13
Compression:
Stored size: 415 Bytes
Contents
require File.expand_path("helper", File.dirname(__FILE__)) test "redirect" do Cuba.define do on "hello" do res.write "hello, world" end on "" do res.redirect "/hello" end end env = { "SCRIPT_NAME" => "/", "PATH_INFO" => "/" } status, headers, body = Cuba.call(env) assert_equal status, 302 assert_equal headers, { "Location" => "/hello" } assert_response body, [] end
Version data entries
13 entries across 13 versions & 1 rubygems