diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-09-12 18:14:59 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-09-12 18:15:13 +0200 |
commit | 99af8dfbc094ea1e8ef17ad6f5158a5b7ce727b4 (patch) | |
tree | 53e0733bd4f1b3582eed121fd853ba292246ee73 | |
parent | e975aa8ada208e6483a53b0bbd9f3a4df0348126 (diff) |
Add test to subtract 12 months from a moment
-rw-r--r-- | src/timetype.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/timetype.rs b/src/timetype.rs index 39fc997..59d6e9c 100644 --- a/src/timetype.rs +++ b/src/timetype.rs @@ -1887,6 +1887,13 @@ mod moment_plus_amount_tests { expected = NaiveDate::from_ymd(1999, 12, 31).and_hms(23, 59, 59); } + generate_test_moment_minus_amount! { + name = test_moment_minus_months; + base = NaiveDate::from_ymd(2000, 1, 1).and_hms(0, 0, 0); + amount = TT::months(12); + expected = NaiveDate::from_ymd(1999, 1, 1).and_hms(0, 0, 0); + } + } #[cfg(test)] |