@@ -22,7 +22,7 @@ final class WebRTCPermissionsAdapter_Tests: StreamVideoTestCase, @unchecked Send
2222 super. tearDown ( )
2323 }
2424
25- func test_willSet_audioOnTrue_withoutSendAudio_withDeniedMic_downgradesAudioOff ( ) async {
25+ func test_willSet_audioOnTrue_withDeniedMic_downgradesAudioOff ( ) async {
2626 mockAppStateAdapter. makeShared ( )
2727 mockPermissions. stubMicrophonePermission ( . denied)
2828 await fulfillment { self . mockPermissions. mockStore. state. microphonePermission == . denied }
@@ -34,33 +34,7 @@ final class WebRTCPermissionsAdapter_Tests: StreamVideoTestCase, @unchecked Send
3434 XCTAssertEqual ( output. videoOn, false )
3535 }
3636
37- func test_willSet_audioOnTrue_withSendAudio_withDeniedMic_downgradesAudioOff( ) async {
38- mockAppStateAdapter. makeShared ( )
39- mockPermissions. stubMicrophonePermission ( . denied)
40- await fulfillment { self . mockPermissions. mockStore. state. microphonePermission == . denied }
41-
42- let input = CallSettings ( audioOn: true , videoOn: false )
43- subject. willSet ( ownCapabilities: [ . sendAudio] )
44- let output = await subject. willSet ( callSettings: input)
45-
46- XCTAssertEqual ( output. audioOn, false )
47- XCTAssertEqual ( output. videoOn, false )
48- }
49-
50- func test_willSet_videoOnTrue_withSendVideo_withDeniedCamera_downgradesVideoOff( ) async {
51- mockAppStateAdapter. makeShared ( )
52- mockPermissions. stubCameraPermission ( . denied)
53- await fulfillment { self . mockPermissions. mockStore. state. cameraPermission == . denied }
54-
55- let input = CallSettings ( audioOn: false , videoOn: true )
56- subject. willSet ( ownCapabilities: [ . sendVideo] )
57- let output = await subject. willSet ( callSettings: input)
58-
59- XCTAssertEqual ( output. audioOn, false )
60- XCTAssertEqual ( output. videoOn, false )
61- }
62-
63- func test_willSet_videoOnTrue_withoutSendVideo_withDeniedCamera_downgradesVideoOff( ) async {
37+ func test_willSet_videoOnTrue_withDeniedCamera_downgradesVideoOff( ) async {
6438 mockAppStateAdapter. makeShared ( )
6539 mockPermissions. stubCameraPermission ( . denied)
6640 await fulfillment { self . mockPermissions. mockStore. state. cameraPermission == . denied }
@@ -72,22 +46,10 @@ final class WebRTCPermissionsAdapter_Tests: StreamVideoTestCase, @unchecked Send
7246 XCTAssertEqual ( output. videoOn, false )
7347 }
7448
75- func test_willSet_audioOnTrue_unknownMic_inForeground_withoutSendAudio_requestsPermission_andKeepsAudioOnWhenGranted( ) async {
76- mockAppStateAdapter. makeShared ( )
77- mockAppStateAdapter. stubbedState = . foreground
78- mockPermissions. stubMicrophonePermission ( . unknown)
79- await fulfillment { self . mockPermissions. mockStore. state. microphonePermission == . unknown }
80-
81- let input = CallSettings ( audioOn: true , videoOn: false )
82- let output = await self . subject. willSet ( callSettings: input)
83- XCTAssertEqual ( output. audioOn, false )
84- }
85-
86- func test_willSet_audioOnTrue_unknownMic_inForeground_withSendAudio_requestsPermission_andKeepsAudioOnWhenGranted( ) async {
49+ func test_willSet_audioOnTrue_unknownMic_inForeground_requestsPermission_andKeepsAudioOnWhenGranted( ) async {
8750 mockAppStateAdapter. makeShared ( )
8851 mockAppStateAdapter. stubbedState = . foreground
8952 mockPermissions. stubMicrophonePermission ( . unknown)
90- subject. willSet ( ownCapabilities: [ . sendAudio] )
9153 await fulfillment { self . mockPermissions. mockStore. state. microphonePermission == . unknown }
9254
9355 await withTaskGroup ( of: Void . self) { group in
@@ -109,22 +71,10 @@ final class WebRTCPermissionsAdapter_Tests: StreamVideoTestCase, @unchecked Send
10971 }
11072 }
11173
112- func test_willSet_videoOnTrue_unknownCamera_inForeground_withoutSendVideo_requestsPermission_andKeepsVideoOnWhenGranted( ) async {
113- mockAppStateAdapter. makeShared ( )
114- mockAppStateAdapter. stubbedState = . foreground
115- mockPermissions. stubCameraPermission ( . unknown)
116- await fulfillment { self . mockPermissions. mockStore. state. cameraPermission == . unknown }
117-
118- let input = CallSettings ( audioOn: false , videoOn: true )
119- let output = await self . subject. willSet ( callSettings: input)
120- XCTAssertEqual ( output. videoOn, false )
121- }
122-
123- func test_willSet_videoOnTrue_unknownCamera_inForeground_withSendVideo_requestsPermission_andKeepsVideoOnWhenGranted( ) async {
74+ func test_willSet_videoOnTrue_unknownCamera_inForeground_requestsPermission_andKeepsVideoOnWhenGranted( ) async {
12475 mockAppStateAdapter. makeShared ( )
12576 mockAppStateAdapter. stubbedState = . foreground
12677 mockPermissions. stubCameraPermission ( . unknown)
127- subject. willSet ( ownCapabilities: [ . sendVideo] )
12878 await fulfillment { self . mockPermissions. mockStore. state. cameraPermission == . unknown }
12979
13080 await withTaskGroup ( of: Void . self) { group in
0 commit comments