Add a test for the CSV parser and check errors on the read config
This commit is contained in:
parent
ea6ba550b1
commit
e9c615197a
2 changed files with 29 additions and 6 deletions
|
@ -15,8 +15,9 @@ func TestReadConfig(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
defer os.Remove(f.Name())
|
||||
|
||||
io.WriteString(f, "---\nbirthday_file: birthday.csv")
|
||||
f.Close()
|
||||
_, werr := io.WriteString(f, "---\nbirthday_file: birthday.csv")
|
||||
require.NoError(t, werr)
|
||||
require.NoError(t, f.Close())
|
||||
|
||||
config, err := ReadConfig(f.Name())
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue