stop appending previous version
This commit is contained in:
parent
413c0c068e
commit
6aea2e9c40
|
@ -201,9 +201,6 @@ func (t *Task) FormatBody() string {
|
||||||
body += fmt.Sprintf("%s\r\n", line)
|
body += fmt.Sprintf("%s\r\n", line)
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.Message != nil {
|
|
||||||
body += fmt.Sprintf("\r\nPrevious version:\r\n\r\n%s\r\n", t.Message.Body)
|
|
||||||
}
|
|
||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,7 @@ func TestFormatBody(t *testing.T) {
|
||||||
Body: "previous body",
|
Body: "previous body",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
exp: "\r\naction: an action\r\ndue: 2021-01-30 (saturday)\r\nproject: project\r\nversion: 6\r\nid: an id\r\ndone: true\r\n\r\nPrevious version:\r\n\r\nprevious body\r\n",
|
exp: "\r\naction: an action\r\ndue: 2021-01-30 (saturday)\r\nproject: project\r\nversion: 6\r\nid: an id\r\ndone: true\r\n",
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue