items <- whatsmeow.QRChannelSuccess
asking.WaitFor(t, "WhatsApp is linked to +15550001111.")
+ // The library connects again after the link with the context of the
+ // connection, so the end of the pairing must not end it.
+ connections := fake.Connections()
+ require.Len(t, connections, 1)
+ require.Never(t, func() bool {
+ return connections[0].Err() != nil
+ }, 200*time.Millisecond, time.Millisecond)
+
require.Equal(t, []string{whatsappTestNumber}, fake.Phones())
require.Equal(t, "WhatsApp is linked and not connected yet.", whatsapp.Status())
require.Equal(t, "[connected to OneChat]\n", other.Output())