mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-27 00:00:03 +03:00
fix: add check to prevent naive implementation of is_international
* fix(structs3): Add check to prevent naive implementation * chore(structs3): Add a missed newline after the test I added
This commit is contained in:
parent
815edb7003
commit
05a753fe63
|
@ -57,6 +57,16 @@ mod tests {
|
||||||
assert!(package.is_international());
|
assert!(package.is_international());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn create_local_package() {
|
||||||
|
let sender_country = String::from("Canada");
|
||||||
|
let recipient_country = sender_country.clone();
|
||||||
|
|
||||||
|
let package = Package::new(sender_country, recipient_country, 1200);
|
||||||
|
|
||||||
|
assert!(!package.is_international());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn calculate_transport_fees() {
|
fn calculate_transport_fees() {
|
||||||
let sender_country = String::from("Spain");
|
let sender_country = String::from("Spain");
|
||||||
|
|
Loading…
Reference in a new issue