Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 committed Aug 7, 2023
1 parent eace0e1 commit 470964c
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,19 @@

@interface NSURLSession_GULPromisesTests : XCTestCase
@property(nonatomic) NSURLSession *URLSession;
@property(nonatomic) NSString *tmpDirectoryPath;
@end

@implementation NSURLSession_GULPromisesTests

- (void)setUp {
self.URLSession = [NSURLSession
sessionWithConfiguration:[NSURLSessionConfiguration ephemeralSessionConfiguration]];

self.tmpDirectoryPath = NSTemporaryDirectory();
[[NSFileManager defaultManager] removeItemAtPath:self.tmpDirectoryPath error:nil];
}

- (void)testDataTaskPromiseWithRequestSuccess {
// Given
NSString *tempPath = [self.tmpDirectoryPath stringByAppendingPathComponent:@"success.txt"];
NSString *tempPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"success.txt"];
[[NSFileManager defaultManager] removeItemAtPath:tempPath error:nil];
NSData *expectedData = [@"Hello, world!" dataUsingEncoding:NSUTF8StringEncoding];
BOOL success = [[NSFileManager defaultManager] createFileAtPath:tempPath
contents:expectedData
Expand All @@ -60,7 +57,9 @@ - (void)testDataTaskPromiseWithRequestSuccess {

- (void)testDataTaskPromiseWithRequestError {
// Given
NSString *tempPath = [self.tmpDirectoryPath stringByAppendingPathComponent:@"does_not_exist.txt"];
NSString *tempPath =
[NSTemporaryDirectory() stringByAppendingPathComponent:@"does_not_exist.txt"];
XCTAssertFalse([[NSFileManager defaultManager] fileExistsAtPath:tempPath]);

// When
NSURL *tempURL = [NSURL fileURLWithPath:tempPath];
Expand Down

0 comments on commit 470964c

Please sign in to comment.