Sha256: 1d3e37f3da9a400a14c787c0364705fdcb2151e9ac738811761e57d1da7efcc7
Contents?: true
Size: 378 Bytes
Versions: 4
Compression:
Stored size: 378 Bytes
Contents
require File.expand_path("helper", File.dirname(__FILE__)) test "accept mimetypes" do Cuba.define do on accept("application/xml") do res.write res["Content-Type"] end end env = { "HTTP_ACCEPT" => "application/xml", "SCRIPT_NAME" => "/", "PATH_INFO" => "/post" } _, _, resp = Cuba.call(env) assert_equal ["application/xml"], resp.body end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
cuba-2.0.0.rc3 | test/accept.rb |
cuba-2.0.0.rc2 | test/accept.rb |
cuba-2.0.0.rc1 | test/accept.rb |
cuba-1.0.0 | test/accept.rb |