Skip to content

Commit

Permalink
Added additional assertions to compare the acceptableContentTypes and…
Browse files Browse the repository at this point in the history
… acceptableStatusCodes properties for copying and archiving.
  • Loading branch information
quellish committed Mar 14, 2016
1 parent dfbe3ed commit f3a7adf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/Tests/AFImageResponseSerializerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ - (void)testImageSerializerCanBeCopied {
XCTAssertNotEqual(copiedSerializer, responseSerializer);
XCTAssertTrue(copiedSerializer.acceptableContentTypes.count == responseSerializer.acceptableContentTypes.count);
XCTAssertTrue(copiedSerializer.acceptableStatusCodes.count == responseSerializer.acceptableStatusCodes.count);
XCTAssertTrue([copiedSerializer.acceptableContentTypes isEqualToSet:responseSerializer.acceptableContentTypes]);
XCTAssertTrue([copiedSerializer.acceptableStatusCodes isEqualToIndexSet:responseSerializer.acceptableStatusCodes]);
XCTAssertTrue(copiedSerializer.automaticallyInflatesResponseImage == responseSerializer.automaticallyInflatesResponseImage);
XCTAssertTrue(fabs(copiedSerializer.imageScale - responseSerializer.imageScale) <= 0.001);

Expand All @@ -58,6 +60,8 @@ - (void)testImageSerializerCanBeArchivedAndUnarchived {
AFImageResponseSerializer *unarchivedSerializer = [NSKeyedUnarchiver unarchiveObjectWithData:archive];
XCTAssertNotNil(unarchivedSerializer);
XCTAssertNotEqual(unarchivedSerializer, responseSerializer);
XCTAssertTrue([unarchivedSerializer.acceptableContentTypes isEqualToSet:responseSerializer.acceptableContentTypes]);
XCTAssertTrue([unarchivedSerializer.acceptableStatusCodes isEqualToIndexSet:responseSerializer.acceptableStatusCodes]);
XCTAssertTrue(unarchivedSerializer.automaticallyInflatesResponseImage == responseSerializer.automaticallyInflatesResponseImage);
XCTAssertTrue(fabs(unarchivedSerializer.imageScale - responseSerializer.imageScale) <= 0.001);
}
Expand Down

0 comments on commit f3a7adf

Please sign in to comment.