File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
samples/client/petstore/objc/SwaggerClientTests/Tests Expand file tree Collapse file tree 1 file changed +19
-2
lines changed 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