forked from mirrors/homebox
refactor: remove empty services (#116)
* remove empty services * remove old factory * remove old static files * cleanup more duplicate service code * file/folder reorg
This commit is contained in:
parent
6529549289
commit
cd82fe0d89
179 changed files with 514 additions and 582 deletions
40
backend/internal/sys/config/conf_mailer_test.go
Normal file
40
backend/internal/sys/config/conf_mailer_test.go
Normal file
|
@ -0,0 +1,40 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_MailerReady_Success(t *testing.T) {
|
||||
mc := &MailerConf{
|
||||
Host: "host",
|
||||
Port: 1,
|
||||
Username: "username",
|
||||
Password: "password",
|
||||
From: "from",
|
||||
}
|
||||
|
||||
assert.True(t, mc.Ready())
|
||||
}
|
||||
|
||||
func Test_MailerReady_Failure(t *testing.T) {
|
||||
mc := &MailerConf{}
|
||||
assert.False(t, mc.Ready())
|
||||
|
||||
mc.Host = "host"
|
||||
assert.False(t, mc.Ready())
|
||||
|
||||
mc.Port = 1
|
||||
assert.False(t, mc.Ready())
|
||||
|
||||
mc.Username = "username"
|
||||
assert.False(t, mc.Ready())
|
||||
|
||||
mc.Password = "password"
|
||||
assert.False(t, mc.Ready())
|
||||
|
||||
mc.From = "from"
|
||||
assert.True(t, mc.Ready())
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue