From 55c5caa1b89624d1607f6b1d4bc2449ed79462aa Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Fri, 27 Sep 2024 23:21:37 +0200 Subject: [PATCH] chore: extract mail to it's own service #181 --- handler/auth.go | 2 +- handler/auth_test.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 handler/auth_test.go diff --git a/handler/auth.go b/handler/auth.go index 0c3f79c..278c621 100644 --- a/handler/auth.go +++ b/handler/auth.go @@ -76,7 +76,7 @@ func (handler HandlerAuthImpl) handleSignIn() http.HandlerFunc { http.Error(w, "Invalid email or password", http.StatusUnauthorized) } else { utils.LogError("Error signing in", err) - http.Error(w, "An error occurred", http.StatusInternalServerError) + http.Error(w, "An error occured", http.StatusInternalServerError) } return } diff --git a/handler/auth_test.go b/handler/auth_test.go new file mode 100644 index 0000000..921902a --- /dev/null +++ b/handler/auth_test.go @@ -0,0 +1,11 @@ +package handler + +import ( + "testing" +) + +func TestHandleSignIn(t *testing.T) { + t.Parallel() + t.Run("should signIn and return session cookie", func(t *testing.T) { + }) +}