Added tests for the new methods in firestore provider

This commit is contained in:
Mariano Uvalle 2019-03-02 23:41:11 -06:00
parent 79a5196aff
commit 0b06d86d0a
2 changed files with 35 additions and 7 deletions

View file

@ -61,6 +61,9 @@ class FirestoreProvider {
return querySnapshot.documents.length > 0;
}
/// Updates a user's data in Firestore.
///
/// Updates are only pushed if at least one property is provided.
Future<void> updateUser(
String id, {
List<String> tasks,
@ -70,7 +73,6 @@ class FirestoreProvider {
int pendingLow,
}) async {
final newData = <String, dynamic>{
'id': id,
'tasks': tasks,
'summary': summary,
'pendingHigh': pendingHigh,