Test initial value of sentRequestIdStateProvider

This commit is contained in:
Sixtus Agbo
2024-03-21 00:04:45 +01:00
parent df25a1b1b3
commit de19fc4279

View File

@ -330,4 +330,23 @@ void main() {
expect(isDisposed, true);
});
});
group("Testing sentRequestIdStateProvider", () {
testWidgets(
'sentRequestIdStateProvider should have an initial value of null',
(tester) async {
await tester.pumpWidget(
const ProviderScope(
child: MaterialApp(
home: CollectionPane(),
),
),
);
// Verify that the initial value is null
final collectionPane = tester.element(find.byType(CollectionPane));
final container = ProviderScope.containerOf(collectionPane);
expect(container.read(sentRequestIdStateProvider), null);
});
});
}