fix: use created time from cmd
This commit is contained in:
parent
366c7dc639
commit
df7ec8cfd4
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,7 @@ impl AddKotUseCase for AddKotService {
|
||||||
}
|
}
|
||||||
|
|
||||||
let kot = KotBuilder::default()
|
let kot = KotBuilder::default()
|
||||||
.created_time(OffsetDateTime::now_utc())
|
.created_time(cmd.created_time().clone())
|
||||||
.order_id(*cmd.order_id())
|
.order_id(*cmd.order_id())
|
||||||
.kot_id(kot_id)
|
.kot_id(kot_id)
|
||||||
.deleted(false)
|
.deleted(false)
|
||||||
|
@ -107,6 +107,7 @@ pub mod tests {
|
||||||
let res = s.add_kot(cmd.clone()).await.unwrap();
|
let res = s.add_kot(cmd.clone()).await.unwrap();
|
||||||
assert_eq!(res.kot().order_id(), cmd.order_id());
|
assert_eq!(res.kot().order_id(), cmd.order_id());
|
||||||
assert!(!res.kot().deleted());
|
assert!(!res.kot().deleted());
|
||||||
|
assert_eq!(res.kot().created_time(), cmd.created_time());
|
||||||
assert_eq!(res.added_by_user(), cmd.adding_by());
|
assert_eq!(res.added_by_user(), cmd.adding_by());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue