Skip to content

Commit

Permalink
chore: remove redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay committed Sep 27, 2024
1 parent 2d98019 commit f167936
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions internal/api/mail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,41 +48,6 @@ func (ts *MailTestSuite) SetupTest() {
require.NoError(ts.T(), ts.API.db.Create(u), "Error saving new user")
}

func (ts *MailTestSuite) TestValidateEmailAuthorizedAddresses() {
ts.Config.External.Email.AuthorizedAddresses = []string{"[email protected]", "[email protected]"}
defer func() {
ts.Config.External.Email.AuthorizedAddresses = nil
}()

positiveExamples := []string{
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
}

negativeExamples := []string{
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
}

for _, example := range positiveExamples {
_, err := ts.API.validateEmail(example)
require.NoError(ts.T(), err)
}

for _, example := range negativeExamples {
_, err := ts.API.validateEmail(example)
require.Error(ts.T(), err)
}
}

func (ts *MailTestSuite) TestGenerateLink() {
// create admin jwt
claims := &AccessTokenClaims{
Expand Down

0 comments on commit f167936

Please sign in to comment.