Fix unit tests

This commit is contained in:
Levi McCallum 2015-10-22 15:27:48 -07:00
parent e9708633bc
commit d9ea1b52ea

View File

@ -91,15 +91,15 @@
{ {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
XCTAssert(collectionView.layoutDelegate != nil, @"should automatically set a layout delegate for flow layouts"); XCTAssert(collectionView.layoutInspector != nil, @"should automatically set a layout delegate for flow layouts");
XCTAssert([collectionView.layoutDelegate isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default"); XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default");
} }
- (void)testThatItDoesNotSetALayoutInspectorForCustomLayouts - (void)testThatItDoesNotSetALayoutInspectorForCustomLayouts
{ {
UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init]; UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init];
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
XCTAssert(collectionView.layoutDelegate == nil, @"should not set a layout delegate for custom layouts"); XCTAssert(collectionView.layoutInspector == nil, @"should not set a layout delegate for custom layouts");
} }
- (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection - (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection