Skip to content

Commit

Permalink
tests and travis grrr
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Jul 25, 2015
1 parent 658bc59 commit adf42b5
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,16 @@ - (void)testStoppingSounds
- (void)testSoundCompletionBlocks
{
[self.sharedPlayer toggleSoundPlayerOn:YES];

XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]];
XCTAssertNoThrow([self.sharedPlayer playSoundWithFilename:kSoundBasso
fileExtension:kJSQSystemSoundTypeAIF
completion:^{
NSLog(@"Exectuing block...");
[expectation fulfill];
}],
@"Player should play and now throw");

XCTAssertTrue([self.sharedPlayer.completionBlocks count] == 1, @"Completion blocks dictionary should contain 1 object");
[self.sharedPlayer playSoundWithFilename:kSoundBasso
fileExtension:kJSQSystemSoundTypeAIF
completion:^{
[expectation fulfill];
}];

[self waitForExpectationsWithTimeout:15 handler:^(NSError * __nullable error) {
[self waitForExpectationsWithTimeout:10 handler:^(NSError * __nullable error) {
XCTAssertNil(error, @"Expectation should not error");
}];
}
Expand Down

0 comments on commit adf42b5

Please sign in to comment.