Skip to content

Commit 3c175c2

Browse files
Merge pull request #364 from Poltuu/fix_syncedblock
Add test to validate deserialization of Synced Block
2 parents fcccb07 + d2980d7 commit 3c175c2

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

Test/Notion.UnitTests/BlocksClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task RetrieveBlockChildren()
3838

3939
// Assert
4040
var children = childrenResult.Results;
41-
children.Should().HaveCount(8);
41+
children.Should().HaveCount(9);
4242
}
4343

4444
[Fact]

Test/Notion.UnitTests/data/blocks/RetrieveBlockChildrenResponse.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,33 @@
155155
"expiry_time": "2022-05-11T17:55:32.613Z"
156156
}
157157
}
158+
},
159+
{
160+
"object": "block",
161+
"id": "570d1df0-56c9-42f7-b8b8-5315323f82de",
162+
"parent": {
163+
"type": "page_id",
164+
"page_id": "9b02f058-bd87-46c2-95d2-7496fb9075bb"
165+
},
166+
"created_time": "2023-02-03T13:59:00.000Z",
167+
"last_edited_time": "2023-02-03T13:59:00.000Z",
168+
"created_by": {
169+
"object": "user",
170+
"id": "92e803ec-193c-4bcd-b28e-88365858d562"
171+
},
172+
"last_edited_by": {
173+
"object": "user",
174+
"id": "92e803ec-193c-4bcd-b28e-88365858d562"
175+
},
176+
"has_children": true,
177+
"archived": false,
178+
"type": "synced_block",
179+
"synced_block": {
180+
"synced_from": {
181+
"type": "block_id",
182+
"block_id": "d2f7e3f3-c553-410d-a5f9-dfc0c335b169"
183+
}
184+
}
158185
}
159186
],
160187
"next_cursor": null,

0 commit comments

Comments
 (0)