path := filepath.Join(t.TempDir(), whatsappStateFileName)
require.NoError(t, os.WriteFile(path, []byte("{"), 0o600))
- _, err := openWhatsAppState(path, whatsappBatchQuiet, whatsappBatchWindow)
+ _, err := openWhatsAppState(path)
require.ErrorContains(t, err, path)
}
require.True(t, found)
}
-// whatsappTestState opens the batches of the state file at path with the
-// times of the plan.
+// whatsappTestState opens the batches of the state file at path with the times
+// of the plan.
func whatsappTestState(t *testing.T, path string) *WhatsAppState {
t.Helper()
- batches, err := openWhatsAppState(path, whatsappBatchQuiet, whatsappBatchWindow)
+ batches, err := openWhatsAppState(path)
require.NoError(t, err)
return batches