Skip to content

Commit

Permalink
tests: update template custom filter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Nov 29, 2024
1 parent b29a0c7 commit 2c0f011
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ fn template_custom_filters() {
"Name: {{ name|substr(0,2) }}\nAmount: {{ amount|human_count }}\nBytes: {{ \
bytes|float|filesizeformat }} {{bytes|float|filesizeformat(true) }}\nScore (2 decimals): \
{{ score|format_float(2) }}\nScore (rounded): {{ score|round_banker(4) }} \
{{score|float|round(4) }}\nActive: {{ active|str_to_bool }}\nFloat with commas: {{ \
{{score|float|round(4) }}\nActive: {{ active|to_bool }}\nFloat with commas: {{ \
amount|human_float_count }}\n\n",
);

Expand Down Expand Up @@ -699,8 +699,8 @@ fn template_custom_filters_error_handling() {
}

#[test]
fn template_str_to_bool_filter() {
let wrk = Workdir::new("template_str_to_bool");
fn template_to_bool_filter() {
let wrk = Workdir::new("template_to_bool");
wrk.create(
"data.csv",
vec![
Expand All @@ -718,7 +718,7 @@ fn template_str_to_bool_filter() {

let mut cmd = wrk.command("template");
cmd.arg("--template")
.arg("{{value|str_to_bool}}\n\n")
.arg("{{value|to_bool}}\n\n")
.arg("data.csv");

let got: String = wrk.stdout(&mut cmd);
Expand Down

0 comments on commit 2c0f011

Please sign in to comment.