Skip to content

Commit d6737cb

Browse files
committed
Fix warnings in tests.
1 parent e731fb9 commit d6737cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Tests/Unit/PurchaseUnitTests.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,21 +153,23 @@ - (void)testAssetContentPath {
153153
PFPurchaseController *mockedPurchaseController = [self mockedPurchaseController];
154154
[Parse _currentManager].purchaseController = mockedPurchaseController;
155155

156+
PFProduct *product = [PFProduct object];
157+
156158
NSString *somePath = [NSTemporaryDirectory() stringByAppendingPathComponent:[[NSUUID UUID] UUIDString]];
157159

158160
OCMStub([mockedPurchaseController assetContentPathForProductWithIdentifier:OCMOCK_ANY
159161
fileName:OCMOCK_ANY]).andReturn(somePath);
160162

161163

162-
XCTAssertNil([PFPurchase assetContentPathForProduct:nil]);
164+
XCTAssertNil([PFPurchase assetContentPathForProduct:product]);
163165

164166
NSError *error;
165167
[@"" writeToFile:somePath atomically:YES
166168
encoding:NSUTF8StringEncoding
167169
error:&error];
168170

169171
XCTAssertNil(error);
170-
XCTAssertNotNil([PFPurchase assetContentPathForProduct:nil]);
172+
XCTAssertNotNil([PFPurchase assetContentPathForProduct:product]);
171173
}
172174

173175
@end

0 commit comments

Comments
 (0)