We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcc67f2 commit fc4961eCopy full SHA for fc4961e
freezed_provider_value_notifier/test/app_state_test.dart
@@ -71,6 +71,20 @@ void main() {
71
});
72
73
group('TodoListController', () {
74
+ test('should load todos from the repository', () async {
75
+ final todos = [Todo('D')];
76
+ final repository = MockRepository(todos);
77
+ final model = TodoListController(todosRepository: repository);
78
+
79
+ expect(model.value.loading, isTrue);
80
+ expect(model.value.todos, []);
81
82
+ await Future.doWhile(() => Future.value(model.value.loading));
83
84
+ expect(model.value.todos, todos);
85
+ expect(model.value.loading, isFalse);
86
87
+ });
88
test('should clear the completed todos', () async {
89
final repository = MockRepository();
90
final todo1 = Todo('a');
0 commit comments