chore: extract mail to it's own service #181
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 45s

This commit is contained in:
2024-09-27 23:21:37 +02:00
parent a70138f2f7
commit fe7178ea03
4 changed files with 18 additions and 5 deletions

View File

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