File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Test/Notion.IntegrationTests Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,60 @@ private static IEnumerable<object[]> BlockData()
452452
453453 Assert . Equal ( "https://www.iaspaper.net/wp-content/uploads/2017/09/TNEA-Online-Application.jpg" , embedBlock . Embed . Url ) ;
454454 } )
455+ } ,
456+ new object [ ]
457+ {
458+ new TemplateBlock ( )
459+ {
460+ Template = new TemplateBlock . Data
461+ {
462+ Text = new List < RichTextBase >
463+ {
464+ new RichTextText
465+ {
466+ Text = new Text
467+ {
468+ Content = "Test Template"
469+ }
470+ }
471+ } ,
472+ Children = new List < ITemplateChildrendBlock >
473+ {
474+ new EmbedBlock ( )
475+ {
476+ Embed = new EmbedBlock . Info
477+ {
478+ Url = "https://zephoria.com/wp-content/uploads/2014/08/online-community.jpg"
479+ }
480+ }
481+ }
482+ }
483+ } ,
484+ new TemplateUpdateBlock ( )
485+ {
486+ Template = new TemplateUpdateBlock . Data
487+ {
488+ Text = new List < RichTextBaseInput >
489+ {
490+ new RichTextTextInput
491+ {
492+ Text = new Text
493+ {
494+ Content = "Test Template 2"
495+ }
496+ }
497+ }
498+ }
499+ } ,
500+ new Action < IBlock > ( block =>
501+ {
502+ Assert . NotNull ( block ) ;
503+ var templateBlock = Assert . IsType < TemplateBlock > ( block ) ;
504+
505+ Assert . Single ( templateBlock . Template . Text ) ;
506+ Assert . Null ( templateBlock . Template . Children ) ;
507+ Assert . Equal ( "Test Template 2" , templateBlock . Template . Text . OfType < RichTextText > ( ) . First ( ) . Text . Content ) ;
508+ } )
455509 }
456510 } ;
457511 }
You can’t perform that action at this time.
0 commit comments