package gamebanana import ( "os" "path" "testing" ) func TestDownloadGameBananaMod(t *testing.T) { tmpdir := t.TempDir() err := DownloadGameBananaMod("602180", tmpdir) if err != nil { t.Error("failed to download game banana mod", err) } // udate is the time the mod was last updated // in unix time, used here as a version number // modID@udate expectedPathToExist := path.Join(tmpdir, "602180@1750696716") if _, err := os.Stat(expectedPathToExist); err != nil { t.Error("mod doesn't have expected name or doesn't exist") } }