mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
fix: env var test updated for panic
This commit is contained in:
@@ -173,14 +173,10 @@ func Test_FindAuthorFileEnv(t *testing.T) {
|
|||||||
// Test Find_authorfile with env var
|
// Test Find_authorfile with env var
|
||||||
setup()
|
setup()
|
||||||
defer teardown()
|
defer teardown()
|
||||||
os.Setenv("author_file", "")
|
os.Setenv("author_file", "author_file_test")
|
||||||
authorfile := utils.Find_authorfile()
|
authorfile := utils.Find_authorfile()
|
||||||
configdir, err := os.UserConfigDir()
|
if authorfile != "author_file_test" {
|
||||||
if err != nil {
|
t.Errorf("Find_authorfile() = %v; want %v", authorfile, "author_file_test")
|
||||||
t.Fatalf("Failed to get user config directory: %v", err)
|
|
||||||
}
|
|
||||||
if authorfile != configdir+"/cocommit/authors.json" {
|
|
||||||
t.Errorf("Find_authorfile() = %v; want %v", authorfile, configdir+"/cocommit/authors.json")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user