Skip to content

Commit 1fbf465

Browse files
Update integration test to verify media blocks are updated ✅
1 parent cd034b9 commit 1fbf465

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Test/Notion.IntegrationTests/IBlocksClientTests.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,36 @@ private static IEnumerable<object[]> BlockData()
398398

399399
Assert.Equal("Test 2", quoteBlock.Quote.Text.OfType<RichTextText>().First().Text.Content);
400400
})
401+
},
402+
new object[]
403+
{
404+
new ImageBlock() {
405+
Image = new ExternalFile
406+
{
407+
External = new ExternalFile.Info
408+
{
409+
Url = "https://zephoria.com/wp-content/uploads/2014/08/online-community.jpg"
410+
}
411+
}
412+
},
413+
new ImageUpdateBlock()
414+
{
415+
Image = new ExternalFileInput
416+
{
417+
External = new ExternalFileInput.Data
418+
{
419+
Url = "https://www.iaspaper.net/wp-content/uploads/2017/09/TNEA-Online-Application.jpg"
420+
}
421+
}
422+
},
423+
new Action<IBlock> (block =>
424+
{
425+
Assert.NotNull(block);
426+
var imageBlock = Assert.IsType<ImageBlock>(block);
427+
var imageFile = Assert.IsType<ExternalFile>(imageBlock.Image);
428+
429+
Assert.Equal("https://www.iaspaper.net/wp-content/uploads/2017/09/TNEA-Online-Application.jpg", imageFile.External.Url);
430+
})
401431
}
402432
};
403433
}

0 commit comments

Comments
 (0)