Cleaned up errors a bit.
This commit is contained in:
@@ -128,7 +128,7 @@ mod tests {
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::*;
|
||||
use crate::domain::{Direction, RecurrenceUnit, ValidationError, WeekendAdjustment};
|
||||
use crate::domain::{Direction, RecurrenceUnit, ScheduleError, WeekendAdjustment};
|
||||
|
||||
fn row() -> RecurringTransactionRow {
|
||||
RecurringTransactionRow {
|
||||
@@ -171,7 +171,7 @@ mod tests {
|
||||
every.recurrence_every = 0;
|
||||
assert!(matches!(
|
||||
decode(every),
|
||||
Err(DecodeError::RecurrenceInterval(_))
|
||||
Err(DecodeError::Schedule(ScheduleError::RecurrenceInterval(_)))
|
||||
));
|
||||
|
||||
let mut unit = row();
|
||||
@@ -182,7 +182,7 @@ mod tests {
|
||||
end.ends_at = Some(end.starts_at - TimeDelta::seconds(1));
|
||||
assert!(matches!(
|
||||
decode(end),
|
||||
Err(DecodeError::Invalid(ValidationError::EndBeforeStart))
|
||||
Err(DecodeError::Schedule(ScheduleError::EndBeforeStart))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user