Skip to content

Instantly share code, notes, and snippets.

@danahartweg
Created July 27, 2020 02:15
Show Gist options
  • Save danahartweg/19ae798ee6ce95a84ecec988cabbffa9 to your computer and use it in GitHub Desktop.
Save danahartweg/19ae798ee6ce95a84ecec988cabbffa9 to your computer and use it in GitHub Desktop.
Second filter conditions test - Support boolean properties to flutter_bloc_list_manager
blocTest(
'filtering one item on a boolean property should still add both items',
build: () async {
whenListen(
_sourceBloc,
Stream.value(MockSourceBlocClassItems([_mockItem1])),
);
return FilterConditionsBloc<MockSourceBlocClassItems>(
sourceBloc: _sourceBloc,
filterProperties: ['conditional'],
);
},
expect: [
ConditionsInitialized(
activeConditions: <String>{},
availableConditions: {
'conditional': [
'True',
'False',
],
},
)
],
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment