From 6becc0787b605e8d004aedc7a677de47b01af53c Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Tue, 24 May 2016 16:20:22 -0400 Subject: [PATCH] Assert that exclusionFlag also exists NSNumber could be fed some non-value that it then coerces into a boolean. --- platform/darwin/test/MGLOfflineStorageTests.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/darwin/test/MGLOfflineStorageTests.m b/platform/darwin/test/MGLOfflineStorageTests.m index 54733e0c291..415039c527b 100644 --- a/platform/darwin/test/MGLOfflineStorageTests.m +++ b/platform/darwin/test/MGLOfflineStorageTests.m @@ -116,7 +116,7 @@ - (void)testBackupExclusion { [cacheURL getResourceValue:&exclusionFlag forKey:NSURLIsExcludedFromBackupKey error:&error]; - XCTAssertTrue([exclusionFlag boolValue], @"Backup exclusion flag should be set for cache database."); + XCTAssertTrue(exclusionFlag && [exclusionFlag boolValue], @"Backup exclusion flag should be set for cache database."); XCTAssertNil(error, @"No errors should be returned when checking backup exclusion flag."); }