# typed: false
require "rails_helper"

RSpec.describe HttpLogEntryHeader, type: :model do
  describe "header scrubbing" do
    it "scrubs blacklisted headers" do
      header =
        HttpLogEntryHeader.build(
          headers: {
            "foo" => "bar",
            "date" => "Tue, 15 Nov 1994 08:12:31 GMT",
          },
        )
      expect(header.headers["foo"]).to eq("bar")
      expect(header.headers["date"]).to eq("Tue, 15 Nov 1994 (scrubbed) GMT")
    end
  end
end
