no more logger
This commit is contained in:
29
config/config_test.go
Normal file
29
config/config_test.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
was := append([]string{}, os.Args...)
|
||||
defer func() {
|
||||
os.Args = was
|
||||
}()
|
||||
os.Args = []string{
|
||||
"nothing",
|
||||
"-addr", "str",
|
||||
"-u", "str",
|
||||
"-p", "str",
|
||||
"-description", "str",
|
||||
"-category", "str",
|
||||
"-to", "str",
|
||||
"-from", "str",
|
||||
"-type", "str",
|
||||
"-cost", "1.5",
|
||||
"-date", "2019-03-04",
|
||||
}
|
||||
if err := New(); err != nil {
|
||||
t.Fatalf("error on new: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user