This commit is contained in:
Rostyslav Tyshko 2024-10-25 00:53:06 +02:00
parent 4de3f95f1f
commit 93216a16ea
2 changed files with 13 additions and 3 deletions

View File

@ -80,7 +80,11 @@ mod tests {
fn sample_payload() -> UTXOPayload {
UTXOPayload {
owner: sample_account(),
asset: serde_json::to_vec(&TestAsset { id: 1, name: "Test".to_string() }).unwrap(),
asset: serde_json::to_vec(&TestAsset {
id: 1,
name: "Test".to_string(),
})
.unwrap(),
}
}
@ -119,7 +123,13 @@ mod tests {
// Interpret asset as TestAsset
let interpreted: TestAsset = utxo.interpret_asset().unwrap();
assert_eq!(interpreted, TestAsset { id: 1, name: "Test".to_string() });
assert_eq!(
interpreted,
TestAsset {
id: 1,
name: "Test".to_string()
}
);
}
#[test]

View File

@ -76,8 +76,8 @@ impl Default for UTXOSparseMerkleTree {
#[cfg(test)]
mod tests {
use super::*;
use crate::utxo_core::{UTXOPayload, UTXO};
use storage::{merkle_tree_public::TreeHashType, AccountId};
use crate::utxo_core::{UTXO, UTXOPayload};
fn sample_utxo_payload() -> UTXOPayload {
UTXOPayload {