Skip to content

Commit

Permalink
Add snaphot test
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTurner committed Feb 6, 2024
1 parent 5cffb25 commit c5689c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/client/src/client/schema/gas_price.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ mod tests {
let operation = QueryLatestGasPrice::build(());
insta::assert_snapshot!(operation.query)
}

#[test]
fn estimate_gas_price_query_gql_output() {
use cynic::QueryBuilder;
let arbitrary_horizon = 10;
let operation = QueryEstimateGasPrice::build(arbitrary_horizon.into());
insta::assert_snapshot!(operation.query)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
source: crates/client/src/client/schema/gas_price.rs
expression: operation.query
---
query($blockHorizon: U32) {
estimateGasPrice(blockHorizon: $blockHorizon) {
gasPrice
}
}


0 comments on commit c5689c1

Please sign in to comment.