Skip to content

Commit

Permalink
cln_rpc: Test deserialize_connect_notification
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikDeSmedt committed Feb 16, 2024
1 parent 8f39201 commit a1af975
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cln-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,22 @@ mod test {
}
})
)
}

#[test]
fn deserialize_connect_notification() {
let connect_json = serde_json::json!({
"connect" : {
"address" : {
"address" : "127.0.0.1",
"port" : 38012,
"type" : "ipv4"
},
"direction" : "in",
"id" : "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59"
}
});

let _ : Notification = serde_json::from_value(connect_json).unwrap();
}
}

0 comments on commit a1af975

Please sign in to comment.