]> git.giacomolli.uk - onechat/blobdiff - whatsapp_state_test.go
Complete context on forwarded local errors
[onechat] / whatsapp_state_test.go
index 2631b4d81caa90d2f7434932bfa21d7db001c8a9..86e83daf9eafc1cb5898e782ee7364ba5b1ab02b 100644 (file)
@@ -134,7 +134,7 @@ func TestWhatsAppStateRefusesABrokenFile(t *testing.T) {
        path := filepath.Join(t.TempDir(), whatsappStateFileName)
        require.NoError(t, os.WriteFile(path, []byte("{"), 0o600))
 
        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.ErrorContains(t, err, path)
 }
 
@@ -154,12 +154,12 @@ func TestWhatsAppStateKeepsTheLastSendRecords(t *testing.T) {
        require.True(t, found)
 }
 
        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()
 
 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
        require.NoError(t, err)
 
        return batches