From e000959b5149f01c0f142d29410a75b880357668 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sat, 11 Apr 2026 17:22:11 +0300 Subject: [PATCH] tests: fix assert.Equal order --- internal/controller/proxy_controller_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/controller/proxy_controller_test.go b/internal/controller/proxy_controller_test.go index f485560..5c07acf 100644 --- a/internal/controller/proxy_controller_test.go +++ b/internal/controller/proxy_controller_test.go @@ -116,7 +116,7 @@ func TestProxyController(t *testing.T) { assert.Equal(t, 307, recorder.Code) location := recorder.Header().Get("Location") - assert.Equal(t, location, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F") + assert.Equal(t, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F", location) }, }, { @@ -129,7 +129,7 @@ func TestProxyController(t *testing.T) { router.ServeHTTP(recorder, req) assert.Equal(t, 401, recorder.Code) location := recorder.Header().Get("x-tinyauth-location") - assert.Equal(t, location, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F") + assert.Equal(t, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F", location) }, }, { @@ -143,7 +143,7 @@ func TestProxyController(t *testing.T) { router.ServeHTTP(recorder, req) assert.Equal(t, 307, recorder.Code) location := recorder.Header().Get("Location") - assert.Equal(t, location, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2Fhello") + assert.Equal(t, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2Fhello", location) }, }, { @@ -159,7 +159,7 @@ func TestProxyController(t *testing.T) { assert.Equal(t, 307, recorder.Code) location := recorder.Header().Get("Location") - assert.Equal(t, location, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F") + assert.Equal(t, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F", location) }, }, { @@ -174,7 +174,7 @@ func TestProxyController(t *testing.T) { router.ServeHTTP(recorder, req) assert.Equal(t, 401, recorder.Code) location := recorder.Header().Get("x-tinyauth-location") - assert.Equal(t, location, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F") + assert.Equal(t, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2F", location) }, }, { @@ -190,7 +190,7 @@ func TestProxyController(t *testing.T) { router.ServeHTTP(recorder, req) assert.Equal(t, 307, recorder.Code) location := recorder.Header().Get("Location") - assert.Equal(t, location, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2Fhello") + assert.Equal(t, "https://tinyauth.example.com/login?redirect_uri=https%3A%2F%2Ftest.example.com%2Fhello", location) }, }, {