X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/522d7fd117285e4e4ce3ea5ec9b5a1722521b681..b961d7cdc59213673c3e4f86d3dae99daf0a1935:/whatsapp_state_test.go?ds=inline diff --git a/whatsapp_state_test.go b/whatsapp_state_test.go index 2631b4d..86e83da 100644 --- a/whatsapp_state_test.go +++ b/whatsapp_state_test.go @@ -134,7 +134,7 @@ func TestWhatsAppStateRefusesABrokenFile(t *testing.T) { 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) } @@ -154,12 +154,12 @@ func TestWhatsAppStateKeepsTheLastSendRecords(t *testing.T) { 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