From 5a8a29a2ff3cbb5c928d60cd4313c7c03bf74c85 Mon Sep 17 00:00:00 2001 From: Kev Date: Sun, 13 Feb 2022 22:31:43 +0100 Subject: [PATCH] Fix failing test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following 3d2c209, `HEAD` routes are no longer shown in the route:list command. This fixes the related failing tests by asserting that the command output doesn’t contain the term `HEAD`. --- test/console/route_list_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/console/route_list_test.go b/test/console/route_list_test.go index 0188ba3..02091bf 100644 --- a/test/console/route_list_test.go +++ b/test/console/route_list_test.go @@ -50,6 +50,6 @@ func Test_route_list_shows_routes(t *testing.T) { result := TrimDoubleSpaces(writer.String()) require.Contains(t, result, "\x1b[33mMETHOD\x1b[0m \x1b[33mURI\x1b[0m \x1b[33mCONTROLLER\x1b[0m \x1b[33mNAME\x1b[0m") require.Contains(t, result, "GET /api github.com/confetti-framework/foundation/test/console.Test_route_list_shows_routes.func1") - require.Contains(t, result, "HEAD /api github.com/confetti-framework/foundation/test/console.Test_route_list_shows_routes.func1") + require.NotContains(t, result, "HEAD") require.Contains(t, result, "POST /api/users github.com/confetti-framework/foundation/test/console.storeUsers users.store") }