# frozen_string_literal: true require_relative "helper" class DefaultHeadersTest < Minitest::Test def setup @app = Class.new(Tynn) end def test_set_and_get_headers @app.set(:default_headers, "Content-Type" => "text/plain") assert_equal "text/plain", @app.default_headers["Content-Type"] end def test_respond_with_headers @app.set(:default_headers, "Content-Type" => "text/plain") @app.define {} ts = Tynn::Test.new(@app) ts.get("/") assert_equal @app.default_headers, ts.res.headers end end