AYM1607 / do_more

A good looking glorified todo list built with flutter.
MIT License
29 stars 15 forks source link

Add unit tests for the firestore provider #1

Open AYM1607 opened 5 years ago

AYM1607 commented 5 years ago

In contrast to the http package, cloud_firestore does not provide a mock instance.

We have to use mockito to test the methods inside the provider.

the following file provides an example on how to test using it: https://github.com/brianegan/flutter_architecture_samples/blob/3fae7fbc01fc1dc87cbfee7208370eb854879b03/example/firebase_flutter_repository/test/firebase_flutter_repository_test.dart

AYM1607 commented 5 years ago

Tests for the operations regarding events and tasks are already in place.

AYM1607 commented 5 years ago

https://github.com/AYM1607/do_more/commit/4aadfbde8c179c361b01b8c8ecfa2f61ef05217a fixes this issue

AYM1607 commented 5 years ago

More tests are needing for checking edge cases, as in firestore not returning anything or Futures failing.