()
| 1882 | |
| 1883 | #[tokio::test(flavor = "multi_thread", worker_threads = 2)] |
| 1884 | async fn test_id_offset() { |
| 1885 | let mut tcm = TestContextManager::new(); |
| 1886 | let alice = tcm.alice().await; |
| 1887 | let bob = tcm.bob().await; |
| 1888 | let fiona = tcm.fiona().await; |
| 1889 | |
| 1890 | // chat ids |
| 1891 | let alice_bob_chat = alice.create_chat(&bob).await; |
| 1892 | let bob_alice_chat = bob.create_chat(&alice).await; |
| 1893 | assert_ne!(alice_bob_chat.id, bob_alice_chat.id); |
| 1894 | |
| 1895 | // contact ids |
| 1896 | let alice_fiona_contact_id = alice.add_or_lookup_contact_id(&fiona).await; |
| 1897 | let fiona_fiona_contact_id = bob.add_or_lookup_contact_id(&fiona).await; |
| 1898 | assert_ne!(alice_fiona_contact_id, fiona_fiona_contact_id); |
| 1899 | |
| 1900 | // message ids |
| 1901 | let alice_group_id = alice |
| 1902 | .create_group_with_members("test group", &[&bob, &fiona]) |
| 1903 | .await; |
| 1904 | let alice_sent_msg = alice.send_text(alice_group_id, "testing").await; |
| 1905 | let bob_received_id = bob.recv_msg(&alice_sent_msg).await; |
| 1906 | assert_ne!(alice_sent_msg.sender_msg_id, bob_received_id.id); |
| 1907 | let fiona_received_id = fiona.recv_msg(&alice_sent_msg).await; |
| 1908 | assert_ne!(bob_received_id.id, fiona_received_id.id); |
| 1909 | } |
| 1910 | } |
nothing calls this directly
no test coverage detected