summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordfhoughton <dfhoughton@gmail.com>2019-12-30 20:07:53 -0500
committerdfhoughton <dfhoughton@gmail.com>2019-12-30 20:07:53 -0500
commit15fe9df0aac52e46ee07d9f0bf5f2342b0dc1924 (patch)
tree179fb30945c11de476fe3e40f4a5e93e7b53e517 /tests
parentaa04e5f57cd94eb8d8f03d0087a8b4776f90b2d1 (diff)
downloadtwo-timer-15fe9df0aac52e46ee07d9f0bf5f2342b0dc1924.zip
reverted ToString
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 8030499..ecf7ccb 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -494,7 +494,7 @@ fn this_pay_period() {
let d1 = NaiveDate::from_ymd(1969, 5, 4).and_hms(0, 0, 0);
let d2 = NaiveDate::from_ymd(1969, 5, 18).and_hms(0, 0, 0);
for pp in ["pp", "pay period", "payperiod"].iter() {
- let (start, end, _) = parse(format!("this {}", pp), Some(config.clone())).unwrap();
+ let (start, end, _) = parse(format!("this {}", pp).as_ref(), Some(config.clone())).unwrap();
assert_eq!(d1, start);
assert_eq!(d2, end);
}
@@ -527,7 +527,7 @@ fn next_pay_period() {
let d1 = NaiveDate::from_ymd(1969, 5, 18).and_hms(0, 0, 0);
let d2 = NaiveDate::from_ymd(1969, 6, 1).and_hms(0, 0, 0);
for pp in ["pp", "pay period", "payperiod"].iter() {
- let (start, end, _) = parse(format!("next {}", pp), Some(config.clone())).unwrap();
+ let (start, end, _) = parse(&format!("next {}", pp), Some(config.clone())).unwrap();
assert_eq!(d1, start);
assert_eq!(d2, end);
}
@@ -544,7 +544,7 @@ fn last_pay_period() {
let d1 = NaiveDate::from_ymd(1969, 4, 20).and_hms(0, 0, 0);
let d2 = NaiveDate::from_ymd(1969, 5, 4).and_hms(0, 0, 0);
for pp in ["pp", "pay period", "payperiod"].iter() {
- let (start, end, _) = parse(format!("last {}", pp), Some(config.clone())).unwrap();
+ let (start, end, _) = parse(&format!("last {}", pp), Some(config.clone())).unwrap();
assert_eq!(d1, start);
assert_eq!(d2, end);
}
@@ -561,7 +561,7 @@ fn this_pay_period_weird() {
let d1 = NaiveDate::from_ymd(1969, 5, 4).and_hms(0, 0, 0);
let d2 = NaiveDate::from_ymd(1969, 5, 18).and_hms(0, 0, 0);
for pp in ["pp", "pay period", "payperiod"].iter() {
- let (start, end, _) = parse(format!("this {}", pp), Some(config.clone())).unwrap();
+ let (start, end, _) = parse(&format!("this {}", pp), Some(config.clone())).unwrap();
assert_eq!(d1, start);
assert_eq!(d2, end);
}
@@ -578,7 +578,7 @@ fn next_pay_period_weird() {
let d1 = NaiveDate::from_ymd(1969, 5, 18).and_hms(0, 0, 0);
let d2 = NaiveDate::from_ymd(1969, 6, 1).and_hms(0, 0, 0);
for pp in ["pp", "pay period", "payperiod"].iter() {
- let (start, end, _) = parse(format!("next {}", pp), Some(config.clone())).unwrap();
+ let (start, end, _) = parse(&format!("next {}", pp), Some(config.clone())).unwrap();
assert_eq!(d1, start);
assert_eq!(d2, end);
}
@@ -595,7 +595,7 @@ fn last_pay_period_weird() {
let d1 = NaiveDate::from_ymd(1969, 4, 20).and_hms(0, 0, 0);
let d2 = NaiveDate::from_ymd(1969, 5, 4).and_hms(0, 0, 0);
for pp in ["pp", "pay period", "payperiod"].iter() {
- let (start, end, _) = parse(format!("last {}", pp), Some(config.clone())).unwrap();
+ let (start, end, _) = parse(&format!("last {}", pp), Some(config.clone())).unwrap();
assert_eq!(d1, start);
assert_eq!(d2, end);
}