github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/config/defaults/config_test.go (about)

     1  package defaults_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/lmorg/murex/config"
     7  	"github.com/lmorg/murex/config/defaults"
     8  	"github.com/lmorg/murex/test/count"
     9  )
    10  
    11  func TestDefaultProfileNotEmpty(t *testing.T) {
    12  	count.Tests(t, 1)
    13  
    14  	if len(defaults.DefaultProfiles) == 0 {
    15  		t.Error("Empty default profile")
    16  	}
    17  }
    18  
    19  func TestDefaultConfigLoads(t *testing.T) {
    20  	count.Tests(t, 1)
    21  
    22  	c := config.InitConf
    23  	defaults.Config(c, false)
    24  
    25  	if len(c.DumpConfig()) == 0 {
    26  		t.Errorf("config not loading")
    27  	}
    28  }