Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ class JtxICalObjectTest {
@Test fun check_input_equals_output_vtodo_rfc5545_sample() = compare_properties("jtx/vtodo/rfc5545-sample1.ics", null)
@Test fun check_input_equals_output_vtodo_empty_priority() = compare_properties("jtx/vtodo/empty-priority.ics", null)
@Test fun check_input_equals_output_vtodo_latin1() = compare_properties("jtx/vtodo/latin1.ics", null)
@Test fun check_input_equals_output_vtodo_attach() = compare_properties("jtx/vtodo/attach.ics", null)

// VJOURNAL
@Test fun check_input_equals_output_vjournal_default_example() = compare_properties("jtx/vjournal/default-example.ics", null)
Expand Down
10 changes: 10 additions & 0 deletions lib/src/androidTest/resources/jtx/vtodo/attach.ics
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VTODO
UID:attach-test
DTSTAMP:20150826T132300Z
SUMMARY:irrelevant
DTSTART:20131009T170000T
ATTACH:https://domain.example/image.jpeg
END:VTODO
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ open class JtxICalObject(
is Attach -> {
val attachment = Attachment()
prop.uri?.let { attachment.uri = it.toString() }
prop.binary.array().let {
prop.binary?.array()?.let {
attachment.binary = Base64.encodeToString(it, Base64.DEFAULT)
}
prop.getParameter<FmtType>(Parameter.FMTTYPE)?.getOrNull()?.let {
Expand Down