do_more icon indicating copy to clipboard operation
do_more copied to clipboard

Add unit tests for the firestore provider

Open AYM1607 opened this issue 6 years ago • 3 comments

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 avatar Feb 24 '19 00:02 AYM1607

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

AYM1607 avatar Feb 25 '19 04:02 AYM1607

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

AYM1607 avatar Feb 25 '19 22:02 AYM1607

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

AYM1607 avatar Feb 27 '19 03:02 AYM1607