Skip to content

Commit

Permalink
tests: Add a test for number_gte block constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
lutter committed May 6, 2024
1 parent 71c7e30 commit d2c5fa4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions store/test-store/tests/graphql/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2635,6 +2635,20 @@ fn can_query_meta() {
run_query(QUERY4, |result, _| {
assert!(result.has_errors());
});

// metadata for number_gte 1. Returns subgraph head and a valid hash
const QUERY5: &str = "query { _meta(block: { number_gte: 1 }) { block { hash number } } }";
run_query(QUERY5, |result, _| {
let exp = object! {
_meta: object! {
block: object! {
hash: BLOCKS[2].hash.to_string(),
number: 2
},
},
};
assert_eq!(extract_data!(result), Some(exp));
});
}

#[test]
Expand Down

0 comments on commit d2c5fa4

Please sign in to comment.