mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
WIP
This commit is contained in:
parent
7b3a09d8ac
commit
4a6f56b44b
7 changed files with 54 additions and 34 deletions
|
@ -48,13 +48,13 @@ func readTestConfig() (*Config, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
expectedConfig := &Config{}
|
||||
err = toml.Unmarshal(content, expectedConfig)
|
||||
expectedConfig := NewDefaultConfig()
|
||||
err = toml.Unmarshal(content, &expectedConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return expectedConfig, nil
|
||||
return &expectedConfig, nil
|
||||
}
|
||||
|
||||
func TestReadConfigShouldReturnEmptyConfigWhenConfigArgEmpty(t *testing.T) {
|
||||
|
@ -62,7 +62,8 @@ func TestReadConfigShouldReturnEmptyConfigWhenConfigArgEmpty(t *testing.T) {
|
|||
t,
|
||||
func(ctx *cli.Context) error {
|
||||
cfg, err := ReadConfig(ctx)
|
||||
assert.Equal(t, &Config{}, cfg)
|
||||
expected := NewDefaultConfig()
|
||||
assert.Equal(t, &expected, cfg)
|
||||
|
||||
return err
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue