diff --git a/payjoin/src/send/error.rs b/payjoin/src/send/error.rs index 1586fc91..f6a16e14 100644 --- a/payjoin/src/send/error.rs +++ b/payjoin/src/send/error.rs @@ -434,10 +434,10 @@ mod tests { _ => panic!("Expected WellKnown error"), }; let unrecognized_error = r#"{"errorCode":"random", "message":"random"}"#; - assert_eq!( - ResponseError::parse(unrecognized_error).to_string(), - "The receiver sent an unrecognized error." - ); + assert!(matches!( + ResponseError::parse(unrecognized_error), + ResponseError::Unrecognized { .. } + )); let invalid_json_error = json!({ "err": "random", "message": "This version of payjoin is not supported."