summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLOfflineStorageTests.m
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-07-07 15:40:07 -0700
committerJesse Bounds <jesse@rebounds.net>2016-07-07 15:40:07 -0700
commit23caa9f7aa9a128896afc0743482e015d2c60373 (patch)
tree0d927ad1f66351c52ad53fe295fe4bed855963a3 /platform/darwin/test/MGLOfflineStorageTests.m
parent2e10c0a8660af9cdf6ff897aaa39e15fe62c6582 (diff)
parentbb057409c728968cf37c9faca2c1eb4c589c5716 (diff)
downloadqtlocation-mapboxgl-23caa9f7aa9a128896afc0743482e015d2c60373.tar.gz
Merge branch 'release-ios-v3.3.0' into master
Diffstat (limited to 'platform/darwin/test/MGLOfflineStorageTests.m')
-rw-r--r--platform/darwin/test/MGLOfflineStorageTests.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLOfflineStorageTests.m b/platform/darwin/test/MGLOfflineStorageTests.m
index 415039c527..e2346c5f61 100644
--- a/platform/darwin/test/MGLOfflineStorageTests.m
+++ b/platform/darwin/test/MGLOfflineStorageTests.m
@@ -106,17 +106,18 @@
// Unit tests don't use the main bundle; use com.mapbox.ios.sdk instead.
NSString *bundleIdentifier = [NSBundle bundleForClass:[MGLMapView class]].bundleIdentifier;
cacheDirectoryURL = [cacheDirectoryURL URLByAppendingPathComponent:bundleIdentifier];
- XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:cacheDirectoryURL.path], @"Cache directory should exist.");
+ cacheDirectoryURL = [cacheDirectoryURL URLByAppendingPathComponent:@".mapbox"];
+ XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:cacheDirectoryURL.path], @"Cache subdirectory should exist.");
NSURL *cacheURL = [cacheDirectoryURL URLByAppendingPathComponent:@"cache.db"];
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:cacheURL.path], @"Cache database should exist.");
NSError *error = nil;
NSNumber *exclusionFlag = nil;
- [cacheURL getResourceValue:&exclusionFlag
- forKey:NSURLIsExcludedFromBackupKey
- error:&error];
- XCTAssertTrue(exclusionFlag && [exclusionFlag boolValue], @"Backup exclusion flag should be set for cache database.");
+ [cacheDirectoryURL getResourceValue:&exclusionFlag
+ forKey:NSURLIsExcludedFromBackupKey
+ error:&error];
+ XCTAssertTrue(exclusionFlag && [exclusionFlag boolValue], @"Backup exclusion flag should be set for the directory containing the cache database.");
XCTAssertNil(error, @"No errors should be returned when checking backup exclusion flag.");
}