mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
update revlog test helper function to assign button_chosen correctly
This commit is contained in:
parent
cf090b8c60
commit
a39f6deede
1 changed files with 5 additions and 1 deletions
|
@ -548,10 +548,14 @@ pub(crate) mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn revlog(review_kind: RevlogReviewKind, days_ago: i64) -> RevlogEntry {
|
pub(crate) fn revlog(review_kind: RevlogReviewKind, days_ago: i64) -> RevlogEntry {
|
||||||
|
let button_chosen = match review_kind {
|
||||||
|
RevlogReviewKind::Manual | RevlogReviewKind::Rescheduled => 0,
|
||||||
|
_ => 3,
|
||||||
|
};
|
||||||
RevlogEntry {
|
RevlogEntry {
|
||||||
review_kind,
|
review_kind,
|
||||||
id: days_ago_ms(days_ago).into(),
|
id: days_ago_ms(days_ago).into(),
|
||||||
button_chosen: 3,
|
button_chosen,
|
||||||
interval: 1,
|
interval: 1,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue