trello-to-deck/src/tests/template.rs
Paul Campbell d48ba1c090
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 2m6s
Test / build (map[name:stable]) (push) Successful in 2m10s
Release Please / Release-plz (push) Failing after 20s
refactor: extract inline module tests::template
2024-12-14 19:51:04 +00:00

14 lines
329 B
Rust

use super::*;
#[test]
fn expand_should_substitute_values() {
//given
let template = "pre{param1}mid{param2}post";
let params = HashMap::from([("param1", "-v1-"), ("param2", "-v2-")]);
//when
let result = crate::template::expand(template, params);
//then
assert_eq!(result, "pre-v1-mid-v2-post");
}