Sha256: 9de9ecc1117560a72531cb82edd9e62feecd59b2081c6d6f672e8f5a5e4d277e
Contents?: true
Size: 598 Bytes
Versions: 11
Compression:
Stored size: 598 Bytes
Contents
require "test_helper" describe Pliny::Middleware::RequestID do def app Rack::Builder.new do use Rack::Lint use Pliny::Middleware::RequestID run Sinatra.new { get "/" do env["REQUEST_IDS"].join(",") end } end end it "tags responses with Request-Id" do get "/" assert_match Pliny::Middleware::RequestID::UUID_PATTERN, last_response.headers["Request-Id"] end it "accepts incoming request IDs" do id = SecureRandom.uuid header "Request-Id", id get "/" assert_includes last_response.body, id end end
Version data entries
11 entries across 11 versions & 1 rubygems