summaryrefslogtreecommitdiff
path: root/testrig/email.go
diff options
context:
space:
mode:
Diffstat (limited to 'testrig/email.go')
-rw-r--r--testrig/email.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/testrig/email.go b/testrig/email.go
index 5873ee442..eb1ac4e06 100644
--- a/testrig/email.go
+++ b/testrig/email.go
@@ -19,7 +19,6 @@
package testrig
import (
- "github.com/spf13/viper"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/email"
)
@@ -30,7 +29,9 @@ import (
// the map, with email address of the recipient as the key, and the value as the
// parsed email message as it would have been sent.
func NewEmailSender(templateBaseDir string, sentEmails map[string]string) email.Sender {
- viper.Set(config.Keys.WebTemplateBaseDir, templateBaseDir)
+ config.Config(func(cfg *config.Configuration) {
+ cfg.WebTemplateBaseDir = templateBaseDir
+ })
var sendCallback func(toAddress string, message string)