chore: fix test
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 44s

This commit is contained in:
2024-09-27 23:39:49 +02:00
parent 8e44a3e649
commit 1f669bd187

View File

@@ -38,7 +38,7 @@ func TestSignIn(t *testing.T) {
), ),
err: nil, err: nil,
} }
underTest := NewServiceAuthImpl(stub) underTest := NewServiceAuthImpl(stub, NewServiceMailStub())
actualUser, err := underTest.SignIn("test@test.de", "password") actualUser, err := underTest.SignIn("test@test.de", "password")
if err != nil { if err != nil {
@@ -71,7 +71,7 @@ func TestSignIn(t *testing.T) {
), ),
err: nil, err: nil,
} }
underTest := NewServiceAuthImpl(stub) underTest := NewServiceAuthImpl(stub, NewServiceMailStub())
_, err := underTest.SignIn("test@test.de", "wrong password") _, err := underTest.SignIn("test@test.de", "wrong password")
if err != ErrInvaidCredentials { if err != ErrInvaidCredentials {
@@ -84,7 +84,7 @@ func TestSignIn(t *testing.T) {
user: nil, user: nil,
err: db.ErrUserNotFound, err: db.ErrUserNotFound,
} }
underTest := NewServiceAuthImpl(stub) underTest := NewServiceAuthImpl(stub, NewServiceMailStub())
_, err := underTest.SignIn("test", "test") _, err := underTest.SignIn("test", "test")
if err != ErrInvaidCredentials { if err != ErrInvaidCredentials {
@@ -97,7 +97,7 @@ func TestSignIn(t *testing.T) {
user: nil, user: nil,
err: errors.New("Some error"), err: errors.New("Some error"),
} }
underTest := NewServiceAuthImpl(stub) underTest := NewServiceAuthImpl(stub, NewServiceMailStub())
_, err := underTest.SignIn("test", "test") _, err := underTest.SignIn("test", "test")
if err != types.ErrInternal { if err != types.ErrInternal {