1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
# frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "protocol/http/header/multiple"
describe Protocol::HTTP::Header::Multiple do
let(:header) {subject.new(description)}
with "first-value" do
it "can add several values" do
header << "second-value"
header << "third-value"
expect(header).to be == ["first-value", "second-value", "third-value"]
expect(header).to have_attributes(
to_s: be == "first-value\nsecond-value\nthird-value"
)
end
end
with ".trailer?" do
it "is not allowed in trailers by default" do
expect(subject).not.to be(:trailer?)
end
end
end
|