Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
add auth test
Browse files Browse the repository at this point in the history
  • Loading branch information
CAGS295 committed Oct 27, 2023
1 parent 7e5d328 commit 7b7ed53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions romeo/src/bitcoin_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,14 @@ mod tests {
assert_eq!(broken_client("http://@host").to_string(), err_string);
assert_eq!(broken_client("http://host").to_string(), err_string,);
}

#[test]
fn stripped_url_auth_is_field() {
let client = client::<0>("http://user:pass@host").unwrap();
assert_eq!(client.bitcoin_url, "http://host".parse().unwrap());
assert_eq!(
client.bitcoin_auth,
Auth::UserPass("user".into(), "pass".into())
);
}
}

0 comments on commit 7b7ed53

Please sign in to comment.