From 55032d2de36b08692d39cc94c4f2da317b3e2eb7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 18:14:16 +0100 Subject: v4.0.4: move the client transport and TOFU into the library --- tests/tofu.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/tofu.rs') diff --git a/tests/tofu.rs b/tests/tofu.rs index b644cc4..a26995f 100644 --- a/tests/tofu.rs +++ b/tests/tofu.rs @@ -133,3 +133,16 @@ fn fingerprint_roundtrip_in_client_db() { client_database::forget_host(&conn, "host1").unwrap(); assert_eq!(client_database::get_fingerprint(&conn, "host1"), None); } + +#[test] +fn a_changed_key_error_names_both_fingerprints() { + let error = zagan_bet::client::transport::TransportError::KeyChanged { + expected: "aaaa".to_string(), + observed: "bbbb".to_string(), + }; + let text = error.to_string(); + + assert!(text.contains("HOST KEY CHANGED"), "{text}"); + assert!(text.contains("aaaa"), "{text}"); + assert!(text.contains("bbbb"), "{text}"); +} -- cgit v1.2.3