(415e1c3) Fix worklane.ts tool when passed multi-line args
This commit is contained in:
@@ -97,6 +97,35 @@ fn add_formats_ticket_correctly() {
|
||||
assert!(content.contains("backlog"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn add_joins_multiple_descriptions() {
|
||||
let temp = TempDir::new().unwrap();
|
||||
setup_worklane(&temp);
|
||||
|
||||
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
|
||||
cmd.current_dir(&temp.path())
|
||||
.args([
|
||||
"add",
|
||||
"--title", "Multi desc ticket",
|
||||
"--description", "Line one",
|
||||
"--description", "Line two",
|
||||
])
|
||||
.assert()
|
||||
.success();
|
||||
|
||||
let files: Vec<_> = fs::read_dir(temp.child(".worklane").join("backlog"))
|
||||
.unwrap()
|
||||
.filter_map(|e| e.ok())
|
||||
.collect();
|
||||
|
||||
assert_eq!(files.len(), 1);
|
||||
let content = fs::read_to_string(files[0].path()).unwrap();
|
||||
|
||||
assert!(content.contains("Line one"));
|
||||
assert!(content.contains("Line two"));
|
||||
assert!(content.contains("\n"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn add_with_optional_fields_uses_defaults() {
|
||||
let temp = TempDir::new().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user