Skip to content

Commit

Permalink
Log : 完善noContentType 的测试用例
Browse files Browse the repository at this point in the history
  • Loading branch information
zuoqin committed Nov 17, 2017
1 parent a006e05 commit b67b78a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion AliyunOSSiOSTests/AliyunOSSiOSTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ @interface oss_ios_sdk_newTests : XCTestCase

@end

NSString * const TEST_BUCKET = @"testbucket";
NSString * const TEST_BUCKET = @"sdk-demo001";

NSString * const PUBLIC_BUCKET = @"public-read-write-android1";
NSString * const ENDPOINT = @"https://oss-cn-qingdao.aliyuncs.com";
Expand Down Expand Up @@ -371,6 +371,17 @@ - (void)testA_putObjectWithoutContentType {
}] waitUntilFinished];


OSSHeadObjectRequest * head = [OSSHeadObjectRequest new];
head.bucketName = TEST_BUCKET;
head.objectKey = uploadObject;
[[[client headObject:head] continueWithBlock:^id(OSSTask *task) {
XCTAssertNil(task.error);
OSSHeadObjectResult * headResult = task.result;
XCTAssertNotNil([headResult.objectMeta objectForKey:@"Content-Type"]);
return nil;
}] waitUntilFinished];


BOOL isEqual = [self isFileOnOSSBucket:TEST_BUCKET objectKey:uploadObject equalsToLocalFile:fileURL.path];
XCTAssertTrue(isEqual);
}
Expand Down

0 comments on commit b67b78a

Please sign in to comment.