Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c7cb99a

Browse files
test: add test for case insensitive query
1 parent 01618e4 commit c7cb99a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎store/test-store/tests/graphql/query.rs‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2880,6 +2880,31 @@ fn can_query_with_or_explicit_and_filter() {
28802880
})
28812881
}
28822882

2883+
#[test]
2884+
fn can_query_array_contains_nocase() {
2885+
const QUERY: &str = "
2886+
query {
2887+
musicians(where: { bands_contains_nocase: [\"B1\", \"B2\"] }) {
2888+
name
2889+
bands { id }
2890+
}
2891+
}
2892+
";
2893+
2894+
run_query(QUERY, |result, _| {
2895+
let exp = object! {
2896+
musicians: vec![
2897+
object! { name: "John", bands: vec![object! { id: "b1" }, object! { id: "b2" }] },
2898+
object! { name: "Lisa", bands: vec![object! { id: "b1" }] },
2899+
object! { name: "Tom", bands: vec![object! { id: "b1" }, object! { id: "b2" }] },
2900+
object! { name: "Paul", bands: vec![ object! { id: "b2" }] },
2901+
],
2902+
};
2903+
let data = extract_data!(result).unwrap();
2904+
assert_eq!(data, exp);
2905+
})
2906+
}
2907+
28832908
#[test]
28842909
fn can_query_with_or_implicit_and_filter() {
28852910
const QUERY: &str = "

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /