Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaplanelad committed Jan 13, 2025
1 parent 58bec24 commit 201b17b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions loco-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,7 @@ mod tests {
"String"
);

assert_eq!(
mapping
.rust_field("array")
.expect_err("expect error")
.to_string(),
"type `array` need params to get the rust field type".to_string()
);
assert!(mapping.rust_field("array").is_err());

assert!(mapping.rust_field("unknown").is_err(),);
}
Expand Down Expand Up @@ -656,13 +650,9 @@ mod tests {
.expect("Get string^ rust field"),
"Vec<String>"
);
assert_eq!(
mapping
.rust_field_with_params("array", &vec!["unknown".to_string()])
.expect_err("expect error")
.to_string(),
"type: `array` not found. try any of: `int,string,chat`"
);
assert!(mapping
.rust_field_with_params("array", &vec!["unknown".to_string()])
.is_err());

assert!(mapping.rust_field_with_params("unknown", &vec![]).is_err());
}
Expand Down

0 comments on commit 201b17b

Please sign in to comment.