Sha256: 04b0f6b46fcbb210de7dbb30d0c1cbda592b1ad9aef5a4a4a9dc217979e798e6
Contents?: true
Size: 673 Bytes
Versions: 30
Compression:
Stored size: 673 Bytes
Contents
require_relative "../spec_helper" describe "delete_empty_headers plugin" do it "automatically deletes headers that are empty" do app(:delete_empty_headers) do |r| response['Foo'] = '' response['Content-Type'] = '' response['Content-Length'] = '' response['Bar'] = '1' 'a' end req[1].must_equal('Bar'=>'1') end it "is called when finishing with a body" do app(:delete_empty_headers) do |r| response['Foo'] = '' response['Content-Type'] = '' response['Content-Length'] = '' response['Bar'] = '1' r.halt response.finish_with_body(['a']) end req[1].must_equal('Bar'=>'1') end end
Version data entries
30 entries across 30 versions & 1 rubygems