|
|
@ -19,7 +19,8 @@ |
|
|
|
pEpUpdater* updater; |
|
|
|
|
|
|
|
- (void)setUp { |
|
|
|
updater = [pEpUpdater new]; |
|
|
|
updater = [[pEpUpdater alloc] initWithSubscriber:^(enum DNType notification, NSString *download) { NSLog(@"notification: %d %@", notification, download); }]; |
|
|
|
|
|
|
|
NSString *path = [[NSBundle bundleForClass:[pEpUpdater_Test class]] pathForResource:@"test.der" ofType:nil]; |
|
|
|
updater.configPath = [path stringByDeletingLastPathComponent]; |
|
|
|
} |
|
|
@ -28,7 +29,7 @@ pEpUpdater* updater; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)testUpdate { |
|
|
|
[updater update:@"test" usingUrl:@"https://fdik.org/cgidownload?hash=23232323234242"]; |
|
|
|
[updater update:@"test" usingUrl:@"https://fdik.org/cgidownload?hash=42232323234242"]; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)testUpdateWithFile { |
|
|
@ -41,6 +42,10 @@ pEpUpdater* updater; |
|
|
|
[updater updateAll:nil]; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)testScheduleUpdate { |
|
|
|
[updater scheduleUpdates]; |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
- (void)testPerformanceExample { |
|
|
|
// This is an example of a performance test case. |
|
|
|