make compatible for new Taskable
This commit is contained in:
@@ -16,6 +16,7 @@ describe('Task', () => {
|
||||
it('allows a new task from a taskable object', () => {
|
||||
const taskable: Taskable = {
|
||||
id: faker.datatype.uuid(),
|
||||
date: faker.date.recent(),
|
||||
title: faker.animal.lion(),
|
||||
link: faker.internet.url(),
|
||||
steps: [createStepFixture()]
|
||||
|
||||
@@ -34,6 +34,7 @@ export class Task implements Taskable {
|
||||
public static fromTaskable(taskable: Taskable) {
|
||||
const task = new Task(taskable.id, taskable.title)
|
||||
task.link = taskable.link
|
||||
task.date = taskable.date
|
||||
task.addSteps(...taskable.steps)
|
||||
|
||||
return task
|
||||
|
||||
Reference in New Issue
Block a user