mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
parent
0f4b04c641
commit
ed191d2f15
5 changed files with 68 additions and 22 deletions
|
@ -33,3 +33,13 @@ func TestInitConfig(t *testing.T) {
|
|||
err := backend.InitConfig(&service)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestInitConfigInvalidTimezone(t *testing.T) {
|
||||
c := viper.New()
|
||||
configuredTimezone := "Invalid/Timezone"
|
||||
c.Set("time-zone", configuredTimezone)
|
||||
service := config.NewServiceConfig("test", c)
|
||||
backend := scrobblerlog.ScrobblerLogBackend{}
|
||||
err := backend.InitConfig(&service)
|
||||
assert.ErrorContains(t, err, `Invalid time-zone "Invalid/Timezone"`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue