taler-rust

GNU Taler code in Rust. Largely core banking integrations.
Log | Files | Refs | Submodules | README | LICENSE

commit 0f60fa4e8cb6a7e644a7c765b1789c735633d45a
parent 6415febfa3a3ecc57f89a3f438c0185555c52d7a
Author: Antoine A <>
Date:   Thu,  8 Jan 2026 17:16:54 +0100

magnet-bank: fix tests

Diffstat:
Mtaler-magnet-bank/src/setup.rs | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/taler-magnet-bank/src/setup.rs b/taler-magnet-bank/src/setup.rs @@ -231,11 +231,12 @@ mod test { // Check encoded round trip assert_eq!(encode_private_key(&secret_key).unwrap(), *key); - // Check JSON roadtrip - json_file::persist("/tmp/keys.json", &content).unwrap(); - assert_eq!( - json_file::load::<KeysFile>("tests/fixtures/keys.json").unwrap(), - content - ); + // Check JSON round trip + let tmp_path = "/tmp/keys.json"; + if std::fs::exists(tmp_path).unwrap() { + std::fs::remove_file(tmp_path).unwrap(); + } + json_file::persist(tmp_path, &content).unwrap(); + assert_eq!(json_file::load::<KeysFile>(tmp_path).unwrap(), content); } }