File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -604,6 +604,32 @@ Feature: Manage WordPress comments
604604 Success: Deleted 2 comments.
605605 """
606606
607+ Scenario : Delete comments with mixed success and failure
608+ Given a WP install
609+ And I run `wp comment create --comment_post_ID=1 --comment_content='Comment 1' --porcelain`
610+ And save STDOUT as {COMMENT_ID_1}
611+ And I run `wp comment create --comment_post_ID=1 --comment_content='Comment 2' --porcelain`
612+ And save STDOUT as {COMMENT_ID_2}
613+
614+ When I run `wp comment delete {COMMENT_ID_1} {COMMENT_ID_2} 99999`
615+ Then STDOUT should contain:
616+ """
617+ Success: Trashed comment {COMMENT_ID_1}.
618+ """
619+ And STDOUT should contain:
620+ """
621+ Success: Trashed comment {COMMENT_ID_2}.
622+ """
623+ And STDERR should contain:
624+ """
625+ Warning: Failed deleting comment 99999.
626+ """
627+ And STDERR should contain:
628+ """
629+ Error: Failed deleting 1 comments.
630+ """
631+ And the return code should be 1
632+
607633 Scenario : Error when no comment IDs and no --all flag provided
608634 Given a WP install
609635
You can’t perform that action at this time.
0 commit comments