Fixed some issues with voice messages when sent from a bridge. (#2190)
This commit is contained in:
@@ -171,8 +171,9 @@ class AudioPlayerStateTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testHandlingAudioPlayerActionDidFinishLoading() async throws {
|
||||
let originalStateProgress = 0.4
|
||||
await audioPlayerState.updateState(progress: originalStateProgress)
|
||||
audioPlayerMock.duration = 10.0
|
||||
|
||||
audioPlayerState = AudioPlayerState(id: .timelineItemIdentifier(.random), duration: 0)
|
||||
audioPlayerState.attachAudioPlayer(audioPlayerMock)
|
||||
|
||||
let deferred = deferFulfillment(audioPlayerState.$playbackState) { action in
|
||||
@@ -189,6 +190,8 @@ class AudioPlayerStateTests: XCTestCase {
|
||||
|
||||
// The state is expected to be .readyToPlay
|
||||
XCTAssertEqual(audioPlayerState.playbackState, .readyToPlay)
|
||||
// The duration should have been updated with the player's duration
|
||||
XCTAssertEqual(audioPlayerState.duration, audioPlayerMock.duration)
|
||||
}
|
||||
|
||||
func testHandlingAudioPlayerActionDidStartPlaying() async throws {
|
||||
|
||||
Reference in New Issue
Block a user