File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,7 @@ - (void)testCancelDownload
294294
295295 NSFileManager *fileManager = [NSFileManager defaultManager ];
296296 XCTAssertFalse ([fileManager fileExistsAtPath: _download.localURL.path]);
297+ XCTAssertEqual (_package.status , CCPackageStatusInitial);
297298}
298299
299300- (void )testPauseDownload
Original file line number Diff line number Diff line change 4949
5050/* *
5151 * Stops the download and deletes the download file
52+ * Status of package is reset to CCPackageStatusInitial.
5253 */
5354- (void )cancel ;
5455
5556/* *
56- * Stops the download
57+ * Pauses the download.
5758 */
5859- (void )pause ;
5960
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ @implementation CCPackageDownload
2727- (instancetype )initWithPackage : (CCPackage *)package localURL : (NSURL *)localURL
2828{
2929 NSAssert (package != nil , @" package must not be nil" );
30- NSAssert (localURL != nil , @" installURL must not be nil" );
30+ NSAssert (localURL != nil , @" localURL must not be nil" );
3131
3232 self = [super init ];
3333 if (self)
@@ -63,6 +63,8 @@ - (void)cancel
6363 [self closeConnectionAndFileHandle ];
6464
6565 [self removeTempAndDownloadFile ];
66+
67+ _package.status = CCPackageStatusInitial;
6668}
6769
6870- (void )pause
You can’t perform that action at this time.
0 commit comments