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
294
294
295
295
NSFileManager *fileManager = [NSFileManager defaultManager ];
296
296
XCTAssertFalse ([fileManager fileExistsAtPath: _download.localURL.path]);
297
+ XCTAssertEqual (_package.status , CCPackageStatusInitial);
297
298
}
298
299
299
300
- (void )testPauseDownload
Original file line number Diff line number Diff line change 49
49
50
50
/* *
51
51
* Stops the download and deletes the download file
52
+ * Status of package is reset to CCPackageStatusInitial.
52
53
*/
53
54
- (void )cancel ;
54
55
55
56
/* *
56
- * Stops the download
57
+ * Pauses the download.
57
58
*/
58
59
- (void )pause ;
59
60
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ @implementation CCPackageDownload
27
27
- (instancetype )initWithPackage : (CCPackage *)package localURL : (NSURL *)localURL
28
28
{
29
29
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" );
31
31
32
32
self = [super init ];
33
33
if (self)
@@ -63,6 +63,8 @@ - (void)cancel
63
63
[self closeConnectionAndFileHandle ];
64
64
65
65
[self removeTempAndDownloadFile ];
66
+
67
+ _package.status = CCPackageStatusInitial;
66
68
}
67
69
68
70
- (void )pause
You can’t perform that action at this time.
0 commit comments