Add a few rslib unit tests

This commit is contained in:
Henrik Giesel 2021-01-10 16:29:10 +01:00
parent 250b89be60
commit adf969d37f

View file

@ -637,6 +637,10 @@ mod test {
s(ctx, "added:3").0, s(ctx, "added:3").0,
format!("(c.id > {})", (timing.next_day_at - (86_400 * 3)) * 1_000) format!("(c.id > {})", (timing.next_day_at - (86_400 * 3)) * 1_000)
); );
assert_eq!(
s(ctx, "added:0").0,
s(ctx, "added:1").0,
);
// deck // deck
assert_eq!( assert_eq!(
@ -727,6 +731,10 @@ mod test {
(timing.next_day_at - (86_400 * 365)) * 1_000 (timing.next_day_at - (86_400 * 365)) * 1_000
) )
); );
assert_eq!(
s(ctx, "rated:0").0,
s(ctx, "rated:1").0
);
// props // props
assert_eq!(s(ctx, "prop:lapses=3").0, "(lapses = 3)".to_string()); assert_eq!(s(ctx, "prop:lapses=3").0, "(lapses = 3)".to_string());