Skip to content

Commit

Permalink
its: Added Issue::change_due
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Jan 14, 2022
1 parent 20cd455 commit 4283404
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion its/crates/domain/src/domain/entity.rs
Expand Up @@ -43,10 +43,19 @@ impl Issue {
id: self.id.clone(),
status: IssueStatus::Done,
title: self.title.clone(),
due: None, // TODO:
due: self.due,
})
}

pub fn change_due(&self, due: Option<IssueDue>) -> Self {
Self {
id: self.id.clone(),
status: self.status,
title: self.title.clone(),
due,
}
}

pub fn id(&self) -> &IssueId {
&self.id
}
Expand Down Expand Up @@ -89,6 +98,11 @@ mod tests {
Ok(())
}

#[test]
fn change_due() {
// TODO:
}

#[test]
fn finish_test() -> anyhow::Result<()> {
let number = IssueNumber::try_from(1_usize)?;
Expand Down

0 comments on commit 4283404

Please sign in to comment.