Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
incrypto32 committed Jul 22, 2024
1 parent 970df8f commit 4f9938a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions graph/src/blockchain/block_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,27 +360,24 @@ fn create_mock_trigger<C: Blockchain>() -> Trigger<C> {

fn create_mock_entity() -> Entity {
let schema = InputSchema::parse_latest(
"type User @entity { id: String!, val: String! }",
"type Block @entity { id: Bytes!, number: BigInt!, hash: Bytes! }",
DeploymentHash::new("test").unwrap(),
)
.unwrap();

let hash = Value::Bytes(
Bytes::from_str("0xd66ea6a52c13884f2a57596e09760905a0cbd3b8ad84af8bb213ad77d79149d0")
.unwrap(),
);

schema
.make_entity(vec![
("id".into(), Value::String("id".to_owned())),
("id".into(), hash.clone()),
(
"number".into(),
Value::BigInt(BigInt::from_str("54321").unwrap()),
),
(
"hash".into(),
Value::Bytes(
Bytes::from_str(
"0xd66ea6a52c13884f2a57596e09760905a0cbd3b8ad84af8bb213ad77d79149d0",
)
.unwrap(),
),
),
("hash".into(), hash),
])
.unwrap()
}
Expand Down

0 comments on commit 4f9938a

Please sign in to comment.