19 lines
		
	
	
	
		
			337 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
	
		
			337 B
		
	
	
	
		
			Go
		
	
	
	
	
	
|  | package config | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"os" | ||
|  | 	fp "path/filepath" | ||
|  | 	"testing" | ||
|  | 
 | ||
|  | 	"github.com/stretchr/testify/assert" | ||
|  | 	"github.com/stretchr/testify/require" | ||
|  | ) | ||
|  | 
 | ||
|  | func TestDefaultConfig(t *testing.T) { | ||
|  | 	home, _ := os.UserHomeDir() | ||
|  | 	inDir := fp.Join(home, "my-log") | ||
|  | 	c, err := DefaultConfig() | ||
|  | 	require.NoError(t, err) | ||
|  | 	assert.Equal(t, inDir, c.Input.Path) | ||
|  | } |