From bb5c2f7714179b1f543412707d20a2c3b5a015ef Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 7 Jan 2026 14:20:56 +0100 Subject: [PATCH] Show the request summery when a field missmatches the request Because: This way it's easier to find where the request went wrong, when having multiple requests in the same test. --- lib/http_ex/backend/mock.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/http_ex/backend/mock.ex b/lib/http_ex/backend/mock.ex index 1e57387..5f9699a 100644 --- a/lib/http_ex/backend/mock.ex +++ b/lib/http_ex/backend/mock.ex @@ -337,9 +337,11 @@ defmodule HTTPEx.Backend.Mock do left: left, right: right, message: """ - The HTTP request that was made, didn't match an expectation + The HTTP request that was made, didn't match an expectation for the following request: #{Shared.attr("Field mismatch")} #{Shared.value(field)} + + #{Request.summary(request)} """ {:error, error} ->