File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 49
49
NSString *const TestGoogleAppID = @" 1:test:google:app:id" ;
50
50
NSString *const TestChangedGoogleAppID = @" 2:changed:google:app:id" ;
51
51
52
+ @interface FIRCLSSettings (Testing)
53
+
54
+ @property (nonatomic , strong ) NSDictionary <NSString *, id> *settingsDictionary;
55
+
56
+ @end
57
+
52
58
@interface FIRCLSSettingsTests : XCTestCase
53
59
54
60
@property (nonatomic , retain ) FIRCLSMockFileManager *fileManager;
@@ -75,6 +81,10 @@ - (void)setUp {
75
81
_settings = [[FIRCLSSettings alloc ] initWithFileManager: _fileManager appIDModel: _appIDModel];
76
82
}
77
83
84
+ - (void )tearDown {
85
+ [_fileManager removeContentsOfDirectoryAtPath: _fileManager.settingsDirectoryPath];
86
+ }
87
+
78
88
- (void )testDefaultSettings {
79
89
XCTAssertEqual (self.settings .isCacheExpired , YES );
80
90
@@ -431,8 +441,10 @@ - (void)testNewReportEndpointSettings {
431
441
[self writeSettings: settingsJSON error: &error];
432
442
NSTimeInterval currentTimestamp = [NSDate timeIntervalSinceReferenceDate ];
433
443
[self .settings cacheSettingsWithGoogleAppID: TestGoogleAppID currentTimestamp: currentTimestamp];
434
-
435
444
XCTAssertNil (error, " %@" , error);
445
+
446
+ XCTAssertNotNil (self.settings .settingsDictionary );
447
+ NSLog (@" [Debug Log] %@ " , self.settings .settingsDictionary );
436
448
XCTAssertTrue (self.settings .shouldUseNewReportEndpoint );
437
449
}
438
450
You can’t perform that action at this time.
0 commit comments