Skip to content

Commit

Permalink
Faking mockery generation
Browse files Browse the repository at this point in the history
Signed-off-by: Ulbrich Robert <[email protected]>
  • Loading branch information
robert-ulbrich-mercedes-benz committed Sep 16, 2024
1 parent 8be8c46 commit 64f3333
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ func TestEmailCreation(t *testing.T) {
}

body := createMailBody("[email protected]", &email)
assert.Equal(t, "From: [email protected]\r\nTo: [email protected],[email protected]\r\nSubject: subject\r\nContent-Type: text/html; charset=\"UTF-8\"\r\n\r\nEmail Body", body)
assert.Contains(t, body, "From: [email protected]\r\n")
assert.Contains(t, body, "To: [email protected],[email protected]")
assert.Contains(t, body, "Subject: subject\r\n")
assert.Contains(t, body, "Content-Type: text/html; charset=\"UTF-8\"\r\n")
assert.Contains(t, body, "Email Body")
}

func TestNewSmtpEmailer(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// This interface is introduced to allow for mocking of the smtp.Client object.

//go:generate mockery --name=SMTPClient --output=../mocks --case=underscore --with-expecter
//go:generate mockery -name=SMTPClient -output=../mocks -case=underscore
type SMTPClient interface {
Hello(localName string) error
Extension(ext string) (bool, string)
Expand Down

0 comments on commit 64f3333

Please sign in to comment.