use a s!(..) shorthand in CLI tests
This commit is contained in:
@@ -27,7 +27,7 @@ mod test {
|
||||
let mut w = test_writer();
|
||||
let mut replica = test_replica();
|
||||
let modification = Modification {
|
||||
description: DescriptionMod::Set("my description".to_owned()),
|
||||
description: DescriptionMod::Set(s!("my description")),
|
||||
..Default::default()
|
||||
};
|
||||
execute(&mut w, &mut replica, modification).unwrap();
|
||||
|
||||
@@ -20,12 +20,12 @@ mod test {
|
||||
#[test]
|
||||
fn test_summary() {
|
||||
let mut w = test_writer();
|
||||
execute(&mut w, "task".to_owned(), true).unwrap();
|
||||
execute(&mut w, s!("task"), true).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_long() {
|
||||
let mut w = test_writer();
|
||||
execute(&mut w, "task".to_owned(), false).unwrap();
|
||||
execute(&mut w, s!("task"), false).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,9 +52,7 @@ mod test {
|
||||
fn test_info() {
|
||||
let mut w = test_writer();
|
||||
let mut replica = test_replica();
|
||||
replica
|
||||
.new_task(Status::Pending, "my task".to_owned())
|
||||
.unwrap();
|
||||
replica.new_task(Status::Pending, s!("my task")).unwrap();
|
||||
|
||||
let filter = Filter {
|
||||
..Default::default()
|
||||
|
||||
@@ -41,9 +41,7 @@ mod test {
|
||||
fn test_list() {
|
||||
let mut w = test_writer();
|
||||
let mut replica = test_replica();
|
||||
replica
|
||||
.new_task(Status::Pending, "my task".to_owned())
|
||||
.unwrap();
|
||||
replica.new_task(Status::Pending, s!("my task")).unwrap();
|
||||
|
||||
let report = Report {
|
||||
filter: Filter {
|
||||
|
||||
@@ -33,14 +33,14 @@ mod test {
|
||||
let mut replica = test_replica();
|
||||
|
||||
let task = replica
|
||||
.new_task(Status::Pending, "old description".to_owned())
|
||||
.new_task(Status::Pending, s!("old description"))
|
||||
.unwrap();
|
||||
|
||||
let filter = Filter {
|
||||
..Default::default()
|
||||
};
|
||||
let modification = Modification {
|
||||
description: DescriptionMod::Set("new description".to_owned()),
|
||||
description: DescriptionMod::Set(s!("new description")),
|
||||
..Default::default()
|
||||
};
|
||||
execute(&mut w, &mut replica, filter, modification).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user