Merge pull request 'fix: use created time from cmd' (#70) from fix-add-kot-created-time into master
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: #70
This commit is contained in:
commit
54471351c6
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,7 @@ impl AddKotUseCase for AddKotService {
|
|||
}
|
||||
|
||||
let kot = KotBuilder::default()
|
||||
.created_time(OffsetDateTime::now_utc())
|
||||
.created_time(cmd.created_time().clone())
|
||||
.order_id(*cmd.order_id())
|
||||
.kot_id(kot_id)
|
||||
.deleted(false)
|
||||
|
@ -107,6 +107,7 @@ pub mod tests {
|
|||
let res = s.add_kot(cmd.clone()).await.unwrap();
|
||||
assert_eq!(res.kot().order_id(), cmd.order_id());
|
||||
assert!(!res.kot().deleted());
|
||||
assert_eq!(res.kot().created_time(), cmd.created_time());
|
||||
assert_eq!(res.added_by_user(), cmd.adding_by());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue