Skip to content

Commit

Permalink
Merge pull request facebookarchive#1134 from bimawa/ASTextNodeAddTest…
Browse files Browse the repository at this point in the history
…Case

Added additionalTruncationMessage Unit test
  • Loading branch information
appleguy committed Jan 28, 2016
2 parents 5b9be8a + 8a8843a commit e22c501
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AsyncDisplayKitTests/ASTextNodeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ - (void)testSettingTruncationMessage
XCTAssertTrue([_textNode.truncationAttributedString isEqualToAttributedString:truncation], @"Failed to set truncation message");
}

- (void)testSettingAdditionalTruncationMessage
{
NSAttributedString *additionalTruncationMessage = [[NSAttributedString alloc] initWithString:@"read more" attributes:nil];
_textNode.additionalTruncationMessage = additionalTruncationMessage;
XCTAssertTrue([_textNode.additionalTruncationMessage isEqualToAttributedString:additionalTruncationMessage], @"Failed to set additionalTruncationMessage message");
}

- (void)testCalculatedSizeIsGreaterThanOrEqualToConstrainedSize
{
for (NSInteger i = 10; i < 500; i += 50) {
Expand Down

0 comments on commit e22c501

Please sign in to comment.