Added tests for the events operations in firebase
This commit is contained in:
parent
dbdb25a6ca
commit
7e8b0b074a
3 changed files with 139 additions and 11 deletions
|
|
@ -231,12 +231,8 @@ class FirestoreProvider {
|
|||
/// Returns a stream of [List<EventModel] that correspond to
|
||||
/// a particular user.
|
||||
Observable<List<EventModel>> getUserEvents(String userDocumentId) {
|
||||
final mappedStream = firestore
|
||||
.collection('users')
|
||||
.document(userDocumentId)
|
||||
.collection('Events')
|
||||
.snapshots()
|
||||
.map(
|
||||
final mappedStream =
|
||||
firestore.collection('users/$userDocumentId/Events').snapshots().map(
|
||||
(QuerySnapshot snapshot) {
|
||||
return snapshot.documents.map((DocumentSnapshot documentSnapshot) {
|
||||
return EventModel.fromFirestore(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue