fix(llc): fix contains filter params
This commit is contained in:
@@ -52,7 +52,7 @@ enum FilterOperator {
|
|||||||
/// Matches none of the values specified in an array.
|
/// Matches none of the values specified in an array.
|
||||||
nor,
|
nor,
|
||||||
|
|
||||||
/// Matches any list that contains the specified values
|
/// Matches any list that contains the specified value
|
||||||
contains,
|
contains,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,8 +162,8 @@ class Filter extends Equatable {
|
|||||||
Filter._(operator: FilterOperator.exists, key: key, value: exists);
|
Filter._(operator: FilterOperator.exists, key: key, value: exists);
|
||||||
|
|
||||||
/// Matches any list that contains the specified values
|
/// Matches any list that contains the specified values
|
||||||
factory Filter.contains(String key, List<Object> values) =>
|
factory Filter.contains(String key, Object value) =>
|
||||||
Filter._(operator: FilterOperator.contains, key: key, value: values);
|
Filter._(operator: FilterOperator.contains, key: key, value: value);
|
||||||
|
|
||||||
/// Creates a custom [Filter] if there isn't one already available.
|
/// Creates a custom [Filter] if there isn't one already available.
|
||||||
const factory Filter.custom({
|
const factory Filter.custom({
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ void main() {
|
|||||||
|
|
||||||
test('contains', () {
|
test('contains', () {
|
||||||
const key = 'testKey';
|
const key = 'testKey';
|
||||||
const values = ['testValue'];
|
const values = 'testValue';
|
||||||
final filter = Filter.contains(key, values);
|
final filter = Filter.contains(key, values);
|
||||||
expect(filter.key, key);
|
expect(filter.key, key);
|
||||||
expect(filter.value, values);
|
expect(filter.value, values);
|
||||||
|
|||||||
Reference in New Issue
Block a user