Skip to content

Commit

Permalink
chore: fix utxorpc snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
rvcas committed Jul 15, 2024
1 parent ff3f118 commit bb30164
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions pallas-utxorpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ utxorpc-spec = { version = "0.7.0" }
[dev-dependencies]
hex = "0.4.3"
serde_json = "1.0.120"
pretty_assertions = "1.4.0"
# utxorpc-spec = { path = "../../../utxorpc/spec/gen/rust" }
3 changes: 2 additions & 1 deletion pallas-utxorpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ impl<C: LedgerContext> Mapper<C> {
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;

#[derive(Clone)]
struct NoLedger;
Expand All @@ -659,7 +660,7 @@ mod tests {
let current = serde_json::json!(mapper.map_block(&block));
let expected: serde_json::Value = serde_json::from_str(&json_str).unwrap();

assert_eq!(current, expected)
assert_eq!(expected, current)
}
}
}
10 changes: 9 additions & 1 deletion test_data/u5c1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,15 @@
"mint": [
{
"assets": [{ "mintCoin": "5000000000", "name": "VFVOQQ==" }],
"policyId": "J5+ELDPu2QVLnjxwzWo7MimCWcJLeLiVy0HZGg=="
"policyId": "J5+ELDPu2QVLnjxwzWo7MimCWcJLeLiVy0HZGg==",
"redeemer": {
"datum": {
"constr": {
"tag": 121
}
},
"purpose": "REDEEMER_PURPOSE_MINT"
}
}
],
"outputs": [
Expand Down

0 comments on commit bb30164

Please sign in to comment.