Add sqlwriter test for introduced

This commit is contained in:
RumovZ 2021-04-18 12:32:02 +02:00
parent 699437df0f
commit e274ff26ab

View File

@ -667,6 +667,16 @@ mod test {
); );
assert_eq!(s(ctx, "added:0").0, s(ctx, "added:1").0,); assert_eq!(s(ctx, "added:0").0, s(ctx, "added:1").0,);
// introduced
assert_eq!(
s(ctx, "introduced:3").0,
format!(
"((select min(id) > {} from revlog where cid = c.id))",
(timing.next_day_at.0 - (86_400 * 3)) * 1_000
)
);
assert_eq!(s(ctx, "introduced:0").0, s(ctx, "introduced:1").0,);
// deck // deck
assert_eq!( assert_eq!(
s(ctx, "deck:default"), s(ctx, "deck:default"),