package config

import (
	"path/filepath"
	"testing"
)

func TestConfigDefaultsLocalDataPaths(t *testing.T) {
	cfg := &Config{}

	if got := cfg.DataDirOrDefault(); got != "data" {
		t.Fatalf("expected default data dir data, got %q", got)
	}
	if got := cfg.DBPathOrDefault(); got != filepath.Join("data", "app.db") {
		t.Fatalf("expected default db path %q, got %q", filepath.Join("data", "app.db"), got)
	}
	if got := cfg.LogDirOrDefault(); got != filepath.Join("data", "logs") {
		t.Fatalf("expected default log dir %q, got %q", filepath.Join("data", "logs"), got)
	}
}
