Skip to content

Commit 98c5926

Browse files
committed
change tests for new api
1 parent 3c5bb2f commit 98c5926

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

FirebaseDatabaseUI/FirebaseCollectionViewDataSource.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ NS_ASSUME_NONNULL_BEGIN
6565
* UICollectionViewCells
6666
* with FIRDataSnapshots.
6767
* @param query A Firebase query to bind the datasource to
68-
* @param identifier A string to use as a CellReuseIdentifier
6968
* @param collectionView An instance of a UICollectionView to bind to
7069
* @return An instance of FirebaseCollectionViewDataSource that populates
7170
* UICollectionViewCells with

FirebaseDatabaseUITests/FirebaseCollectionViewDataSourceTest.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ - (void)setUp {
4444
self.observable = [[FUITestObservable alloc] init];
4545
// Horrible abuse of type system, knowing that the initializer passes the observable straight to
4646
// FirebaseArray anyway.
47-
self.dataSource = [[FirebaseCollectionViewDataSource alloc] initWithRef:(FIRDatabaseReference *)self.observable
48-
cellReuseIdentifier:kTestReuseIdentifier
49-
view:self.collectionView];
50-
[self.dataSource populateCellWithBlock:^(__kindof UICollectionViewCell *_Nonnull cell,
51-
FUIFakeSnapshot * _Nonnull object) {
47+
self.dataSource = [[FirebaseCollectionViewDataSource alloc] initWithQuery:(FIRDatabaseReference *)self.observable
48+
view:self.collectionView
49+
populateCell:^UICollectionViewCell *(NSIndexPath *indexPath, UICollectionView *collectionView, FIRDataSnapshot *object) {
50+
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kTestReuseIdentifier forIndexPath:indexPath];
5251
cell.accessibilityValue = object.key;
52+
return cell;
5353
}];
5454
self.collectionView.dataSource = self.dataSource;
5555

0 commit comments

Comments
 (0)