File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
OptimizelySDKDatafileManager/OptimizelySDKDatafileManagerTests Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -170,19 +170,15 @@ - (void)testDatafileManagerDownloadDatafileSavesDatafile {
170
170
}];
171
171
172
172
// Call download datafile
173
- __block Boolean completionWasCalled = false ;
174
173
175
174
[datafileManager downloadDatafile: datafileManager.projectId
176
175
completionHandler: ^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
177
- completionWasCalled = true ;
176
+ XCTAssertTrue ([ self .dataStore fileExists: kProjectId type: OPTLYDataStoreDataTypeDatafile], @" we should have stored the datafile " ) ;
178
177
[expectation fulfill ];
179
178
}];
180
179
181
180
// make sure we were able to save the datafile
182
- [self waitForExpectationsWithTimeout: 2 handler: nil ];
183
- XCTAssertTrue (completionWasCalled);
184
- XCTAssertTrue ([self .dataStore fileExists: kProjectId type: OPTLYDataStoreDataTypeDatafile], @" we should have stored the datafile" );
185
-
181
+ [self waitForExpectationsWithTimeout: 2 handler: nil ];
186
182
// cleanup stubs
187
183
[OHHTTPStubs removeStub: stub];
188
184
}
You can’t perform that action at this time.
0 commit comments