Skip to content

Commit 1038fdf

Browse files
committed
Add list_with_post_endpoint_type_using_default_params test
1 parent 2419bef commit 1038fdf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

wp_api_integration_tests/tests/test_posts_immut.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,22 @@ async fn paginate_list_posts_with_edit_context(#[case] params: PostListParams) {
227227
assert!(!prev_page_response.data.is_empty());
228228
}
229229

230+
#[tokio::test]
231+
#[rstest]
232+
#[parallel]
233+
#[case(PostEndpointType::Posts)]
234+
#[case(PostEndpointType::Pages)]
235+
// This test ensures that we can list & parse the given post type with default params
236+
async fn list_with_post_endpoint_type_using_default_params(
237+
#[case] post_endpoint_type: PostEndpointType,
238+
) {
239+
api_client()
240+
.posts()
241+
.list_with_edit_context(&post_endpoint_type, &PostListParams::default())
242+
.await
243+
.assert_response();
244+
}
245+
230246
#[template]
231247
#[rstest]
232248
#[case::default(PostListParams::default())]

0 commit comments

Comments
 (0)