File tree Expand file tree Collapse file tree
src/test/java/io/getstream Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -648,6 +648,42 @@ void testCreateCallWithBackstageAndJoinAhead() throws Exception {
648648 assertEquals (0 , updateResp2 .getData ().getCall ().getJoinAheadTimeSeconds ());
649649 }
650650
651+ @ Test
652+ @ Order (12 )
653+ void testDeleteCall () throws Exception {
654+ // Create a call
655+ String callId = "test-call-" + RandomStringUtils .randomAlphabetic (8 ).toLowerCase ();
656+
657+ video
658+ .getOrCreateCall (
659+ "default" ,
660+ callId ,
661+ GetOrCreateCallRequest .builder ()
662+ .data (CallRequest .builder ().createdByID (testUsers .get (0 ).getId ()).build ())
663+ .build ())
664+ .execute ();
665+
666+ // Soft delete the call
667+ var deleteResp =
668+ video .deleteCall ("default" , callId , DeleteCallRequest .builder ().build ()).execute ();
669+
670+ assertNotNull (deleteResp .getData ());
671+ assertNotNull (deleteResp .getData ().getCall ());
672+ assertNull (deleteResp .getData ().getTaskID ());
673+
674+ // Verify the call is no longer found
675+ try {
676+ video .getCall ("default" , callId ).execute ();
677+ fail ("Expected exception when getting deleted call" );
678+ } catch (Exception e ) {
679+ assertTrue (
680+ e .getMessage ().contains ("Can't find call with id" )
681+ || e .getMessage ().contains ("not found" )
682+ || e .getMessage ().contains ("404" ),
683+ "Expected 'not found' error but got: " + e .getMessage ());
684+ }
685+ }
686+
651687 @ Test
652688 @ Order (8 )
653689 void testDeactivateUser () throws Exception {
You can’t perform that action at this time.
0 commit comments