🏷️ Added TestConfig domain
This commit is contained in:
parent
b8ba8dd392
commit
3f18bf73b5
|
@ -0,0 +1,23 @@
|
|||
package domain
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// TODO(toby3d): create Config domain
|
||||
|
||||
// TestConfig returns a valid *viper.Viper with the generated test data filled in.
|
||||
func TestConfig(tb testing.TB) *viper.Viper {
|
||||
tb.Helper()
|
||||
|
||||
v := viper.New()
|
||||
v.Set("indieauth.jwtSecret", "hackme")
|
||||
v.Set("indieauth.jwtSigningAlgorithm", "HS256")
|
||||
v.Set("server.domain", "example.com")
|
||||
v.Set("server.protocol", "https")
|
||||
v.Set("server.rootUrl", "{{protocol}}://{{domain}}/")
|
||||
|
||||
return v
|
||||
}
|
Loading…
Reference in New Issue