@@ -25,7 +25,7 @@ func TestRpc_MiscSetDraft_and_MiscSendDraft(t *testing.T) {
2525 acfactory .WithOnlineAccount (func (rpc * Rpc , accId AccountId ) {
2626 chatId , err := rpc .CreateGroupChat (accId , "test group" , true )
2727 require .Nil (t , err )
28- err = rpc .MiscSetDraft (accId , chatId , option .Some ("test" ), option .None [string ](), option .None [MsgId ](), option .None [MsgType ]())
28+ err = rpc .MiscSetDraft (accId , chatId , option .Some ("test" ), option .None [string ](), option .None [string ](), option . None [ MsgId ](), option .None [MsgType ]())
2929 require .Nil (t , err )
3030 _ , err = rpc .MiscSendDraft (accId , chatId )
3131 require .Nil (t , err )
@@ -174,19 +174,9 @@ func TestAccount_Contacts(t *testing.T) {
174174 assert .Nil (t , err )
175175 assert .Empty (t , ids )
176176
177- contactId , err := rpc .CreateContact (accId , "null@localhost" , "test" )
178- assert .Nil (t , err )
179-
180- ids , err = rpc .GetContactIds (accId , 0 , option .None [string ]())
181- assert .Nil (t , err )
182- assert .Contains (t , ids , contactId )
183-
184177 ids , err = rpc .GetContactIds (accId , 0 , option .Some ("unknown" ))
185178 assert .Nil (t , err )
186179 assert .Empty (t , ids )
187- ids , err = rpc .GetContactIds (accId , 0 , option .Some ("test" ))
188- assert .Nil (t , err )
189- assert .Contains (t , ids , contactId )
190180 })
191181}
192182
@@ -260,15 +250,6 @@ func TestAccount_QrCode(t *testing.T) {
260250 })
261251}
262252
263- func TestAccount_ImportSelfKeys (t * testing.T ) {
264- t .Parallel ()
265- acfactory .WithOnlineAccount (func (rpc * Rpc , accId AccountId ) {
266- dir := acfactory .MkdirTemp ()
267- assert .Nil (t , rpc .ExportSelfKeys (accId , dir ))
268- assert .Nil (t , rpc .ImportSelfKeys (accId , dir ))
269- })
270- }
271-
272253func TestAccount_ImportBackup (t * testing.T ) {
273254 t .Parallel ()
274255 var backup string
@@ -481,12 +462,6 @@ func TestChat_Groups(t *testing.T) {
481462 assert .Nil (t , rpc .SetChatProfileImage (accId , chatId , option .None [string ]()))
482463 assert .Nil (t , rpc .SetChatName (accId , chatId , "new name" ))
483464
484- contactId , err := rpc .CreateContact (accId , "null@localhost" , "test" )
485- assert .Nil (t , err )
486- assert .Nil (t , rpc .AddContactToChat (accId , chatId , contactId ))
487-
488- assert .Nil (t , rpc .RemoveContactFromChat (accId , chatId , contactId ))
489-
490465 _ , err = rpc .GetChatContacts (accId , chatId )
491466 assert .Nil (t , err )
492467
@@ -497,9 +472,5 @@ func TestChat_Groups(t *testing.T) {
497472
498473 _ , err = rpc .SendMsg (accId , chatId , MsgData {Text : "test message" })
499474 assert .Nil (t , err )
500-
501- assert .Nil (t , rpc .SetConfig (accId , "webrtc_instance" , option .Some ("https://test.example.com" )))
502- _ , err = rpc .SendVideoChatInvitation (accId , chatId )
503- assert .Nil (t , err )
504475 })
505476}
0 commit comments