Sha256: 4620f7a899cb61b27fe01cbb52eaa64a14a03bbef49b9ae92afc9b1fc47da745
Contents?: true
Size: 1.35 KB
Versions: 6
Compression:
Stored size: 1.35 KB
Contents
require 'spec_helper' class RFlow module Components module HTTP module Extensions describe HTTPRequestExtension do it "should work" do expect(Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Request']).to include(described_class) Message.new('RFlow::Message::Data::HTTP::Request').data.tap do |d| expect(d.uri).to eq('/') expect(d.method).to eq('GET') expect(d.query_string).to be_nil expect(d.protocol).to eq('HTTP/1.0') expect(d.headers).to eq({}) d.uri = '/foo' expect(d.uri).to eq('/foo') end end end describe HTTPResponseExtension do it "should work" do expect(Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Response']).to include(described_class) Message.new('RFlow::Message::Data::HTTP::Response').data.tap do |d| expect(d.protocol).to eq('HTTP/1.0') expect(d.status_code).to eq(200) expect(d.status_reason_phrase).to eq('OK') expect(d.headers).to eq({}) expect(d.content).to eq('') d.status_code = 404 expect(d.status_code).to eq(404) end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems