Skip to content

Commit

Permalink
Close URI test TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGould committed Jul 11, 2024
1 parent 2cd4b2c commit ede303b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions payjoin/src/uri/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ mod tests {

for address in [base58, bech32_upper, bech32_lower].iter() {
for pj in [https, onion].iter() {
// TODO add with and without amount
// TODO shuffle params
let uri = format!("{}?amount=1&pj={}", address, pj);
assert!(Uri::try_from(&*uri).is_ok());
let uri_with_amount = format!("{}?amount=1&pj={}", address, pj);
assert!(Uri::try_from(uri_with_amount).is_ok());

let uri_without_amount = format!("{}?pj={}", address, pj);
assert!(Uri::try_from(uri_without_amount).is_ok());

let uri_shuffled_params = format!("{}?pj={}&amount=1", address, pj);
assert!(Uri::try_from(uri_shuffled_params).is_ok());
}
}
}
Expand Down

0 comments on commit ede303b

Please sign in to comment.