File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
samples/client/petstore/objc/SwaggerClientTests Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 2
2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
<plist version =" 1.0" >
4
4
<dict >
5
+ <key >NSAppTransportSecurity </key >
6
+ <dict >
7
+ <key >NSAllowsArbitraryLoads </key >
8
+ <true />
9
+ </dict >
5
10
<key >CFBundleDevelopmentRegion </key >
6
11
<string >en </string >
7
12
<key >CFBundleDisplayName </key >
Original file line number Diff line number Diff line change @@ -218,8 +218,8 @@ - (void)testDeletePet {
218
218
[self waitForExpectationsWithTimeout: 10.0 handler: nil ];
219
219
}
220
220
221
- - (void )testUploadFile {
222
- XCTestExpectation *expectation = [self expectationWithDescription: @" testUploadWithFile " ];
221
+ - (void )testUploadFileWithFormParameter {
222
+ XCTestExpectation *expectation = [self expectationWithDescription: @" testUploadWithFileWithFormParameter " ];
223
223
224
224
NSURL *fileURL = [self createTempFile ];
225
225
@@ -236,6 +236,23 @@ - (void)testUploadFile {
236
236
[self waitForExpectationsWithTimeout: 10.0 handler: nil ];
237
237
}
238
238
239
+ - (void )testUploadFile {
240
+ XCTestExpectation *expectation = [self expectationWithDescription: @" testUploadFile" ];
241
+
242
+ NSURL *fileURL = [self createTempFile ];
243
+
244
+ [api uploadFileWithCompletionBlock: @1 additionalMetadata: nil file: fileURL completionHandler: ^(NSError *error) {
245
+ if (error) {
246
+ XCTFail (@" expected a failure" );
247
+ }
248
+ else {
249
+ [expectation fulfill ];
250
+ }
251
+ }];
252
+
253
+ [self waitForExpectationsWithTimeout: 10.0 handler: nil ];
254
+ }
255
+
239
256
- (void )TestUploadWithoutFile {
240
257
XCTestExpectation *expectation = [self expectationWithDescription: @" testUploadWithoutFile" ];
241
258
You can’t perform that action at this time.
0 commit comments