File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Test/Notion.IntegrationTests Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public async Task Test_RetrievePagePropertyItemAsync()
142
142
143
143
var listProperty = ( ListPropertyItem ) property ;
144
144
145
- listProperty . Type . Should ( ) . BeNull ( ) ;
145
+ listProperty . Type . Should ( ) . NotBeNull ( ) ;
146
146
listProperty . Results . Should ( ) . SatisfyRespectively ( p =>
147
147
{
148
148
p . Should ( ) . BeOfType < TitlePropertyItem > ( ) ;
@@ -202,7 +202,11 @@ public async Task Test_UpdatePageProperty_with_date_as_null()
202
202
203
203
var page = await _client . Pages . CreateAsync ( pagesCreateParameters ) ;
204
204
205
- var setDate = page . Properties [ datePropertyName ] as DatePropertyValue ;
205
+ var setDate = ( DatePropertyItem ) await _client . Pages . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
206
+ {
207
+ PageId = page . Id ,
208
+ PropertyId = page . Properties [ datePropertyName ] . Id
209
+ } ) ;
206
210
207
211
setDate ? . Date ? . Start . Should ( ) . Be ( Convert . ToDateTime ( "2020-12-08T12:00:00Z" ) ) ;
208
212
@@ -215,7 +219,11 @@ public async Task Test_UpdatePageProperty_with_date_as_null()
215
219
Properties = testProps
216
220
} ) ;
217
221
218
- var verifyDate = updatedPage . Properties [ datePropertyName ] as DatePropertyValue ;
222
+ var verifyDate = ( DatePropertyItem ) await _client . Pages . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
223
+ {
224
+ PageId = page . Id ,
225
+ PropertyId = updatedPage . Properties [ datePropertyName ] . Id
226
+ } ) ;
219
227
220
228
verifyDate ? . Date . Should ( ) . BeNull ( ) ;
221
229
You can’t perform that action at this time.
0 commit comments