Satisfy rslib unit tests

This commit is contained in:
Henrik Giesel 2021-01-11 17:18:40 +01:00
parent 7a7152fe27
commit 5eb2c7b271

View file

@ -226,7 +226,7 @@ impl SqlWriter<'_> {
match ease {
EaseKind::Rated(u) => write!(self.sql, " and ease = {})", u),
EaseKind::Reviewed => write!(self.sql, " and ease in (1, 2, 3, 4))"),
EaseKind::Reviewed => write!(self.sql, " and ease between 1 and 4)"),
EaseKind::Manually => write!(self.sql, " and ease = 0)"),
}
.unwrap();
@ -719,7 +719,7 @@ mod test {
assert_eq!(
s(ctx, "rated:2").0,
format!(
"(c.id in (select cid from revlog where id>{}))",
"(c.id in (select cid from revlog where id>{} and ease between 1 and 4))",
(timing.next_day_at - (86_400 * 2)) * 1_000
)
);