File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
JSQSystemSoundPlayer/JSQSystemSoundPlayerTests Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -208,19 +208,16 @@ - (void)testStoppingSounds
208208- (void )testSoundCompletionBlocks
209209{
210210 [self .sharedPlayer toggleSoundPlayerOn: YES ];
211-
211+
212212 XCTestExpectation *expectation = [self expectationWithDescription: [NSString stringWithFormat: @" %s " , __PRETTY_FUNCTION__]];
213- XCTAssertNoThrow ([self .sharedPlayer playSoundWithFilename: kSoundBasso
214- fileExtension: kJSQSystemSoundTypeAIF
215- completion: ^{
216- NSLog (@" Exectuing block..." );
217- [expectation fulfill ];
218- }],
219- @" Player should play and now throw" );
220213
221- XCTAssertTrue ([self .sharedPlayer.completionBlocks count ] == 1 , @" Completion blocks dictionary should contain 1 object" );
214+ [self .sharedPlayer playSoundWithFilename: kSoundBasso
215+ fileExtension: kJSQSystemSoundTypeAIF
216+ completion: ^{
217+ [expectation fulfill ];
218+ }];
222219
223- [self waitForExpectationsWithTimeout: 15 handler: ^(NSError * __nullable error) {
220+ [self waitForExpectationsWithTimeout: 10 handler: ^(NSError * __nullable error) {
224221 XCTAssertNil (error, @" Expectation should not error" );
225222 }];
226223}
You can’t perform that action at this time.
0 commit comments