package config import ( "testing" "github.com/photoprism/photoprism/internal/util" "github.com/stretchr/testify/assert" ) func TestNewConfig(t *testing.T) { ctx := CliTestContext() assert.True(t, ctx.IsSet("assets-path")) assert.False(t, ctx.Bool("debug")) c := NewConfig(ctx) assert.IsType(t, new(Config), c) assert.Equal(t, util.ExpandedFilename("../../assets"), c.AssetsPath()) assert.False(t, c.Debug()) assert.False(t, c.ReadOnly()) }