From 5b11e8dc48aa6465ee42187de99950431fa9cf07 Mon Sep 17 00:00:00 2001 From: thymusvulgaris <87661013+thymusvulgaris@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:22:24 +0100 Subject: [PATCH] Add Plug.Conn.Utils tests (#1230) --- lib/plug/conn/utils.ex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/plug/conn/utils.ex b/lib/plug/conn/utils.ex index e2652477..a98d09d2 100644 --- a/lib/plug/conn/utils.ex +++ b/lib/plug/conn/utils.ex @@ -117,6 +117,9 @@ defmodule Plug.Conn.Utils do iex> content_type "*/*" :error + iex> content_type "something" + :error + """ @spec content_type(binary) :: {:ok, type :: binary, subtype :: binary, params} | :error def content_type(binary) do @@ -162,6 +165,9 @@ defmodule Plug.Conn.Utils do iex> params(";") %{} + iex> params("foo=") + %{} + """ @spec params(binary) :: params def params(t) do