Skip to content

Commit

Permalink
Fix test failing
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 authored and Rajul Arora committed Jul 13, 2018
1 parent 6d7c127 commit 47ef2e2
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
*/

#import <TwitterCore/TWTRDateFormatters.h>
#import <TwitterCore/TWTRDateFormatters_Private.h>
#import <XCTest/XCTest.h>
#import "TUDelorean+Rollback.h"
#import "TUDelorean.h"
Expand All @@ -38,6 +40,9 @@ - (void)setUp
{
[super setUp];

[TWTRDateFormatters resetCache];
[TWTRDateFormatters setLocale:[NSLocale localeWithLocaleIdentifier:@"en_US"]];

self.timestamp = [[TWTRTimestampLabel alloc] init];

// Tweet setup
Expand Down Expand Up @@ -74,13 +79,14 @@ - (void)testNilDate_EmptyStrings

- (void)testRegularFormattedDate
{
[TUDelorean temporarilyTimeTravelTo:self.november2014 block:^(NSDate *date) {
self.timestamp.date = self.obamaTweet.createdAt;
XCTAssertEqualObjects(self.timestamp.text, @" • 11/6/12");
[TUDelorean temporarilyTimeTravelTo:self.november2014
block:^(NSDate *date) {
self.timestamp.date = self.obamaTweet.createdAt;
XCTAssertEqualObjects(self.timestamp.text, @" • 11/6/12");

self.timestamp.date = self.googleTweet.createdAt;
XCTAssertEqualObjects(self.timestamp.text, @" • May 23");
}];
self.timestamp.date = self.googleTweet.createdAt;
XCTAssertEqualObjects(self.timestamp.text, @" • May 23");
}];
}

@end

0 comments on commit 47ef2e2

Please sign in to comment.