Skip to content

Commit

Permalink
Merge pull request #299 from wp-cli/fix-comment-approval-test
Browse files Browse the repository at this point in the history
Fix comment approval test
  • Loading branch information
schlessera authored Jul 5, 2020
2 parents 96cb181 + ad25f8f commit 39fcea4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions features/comment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ Feature: Manage WordPress comments
Given I run `wp comment create --comment_post_ID=1 --comment_approved=0 --porcelain`
And save STDOUT as {COMMENT_ID}

# With site url set.
# With site url set.
When I run `wp comment approve {COMMENT_ID} --url=www.example.com`
Then STDOUT should be:
"""
Success: Approved comment {COMMENT_ID}.
"""

When I try the previous command again
Then STDERR should be:
Then STDERR should contain:
"""
Error: Could not update comment status
"""
Expand All @@ -189,7 +189,7 @@ Feature: Manage WordPress comments
0
"""

# Without site url set.
# Without site url set.
When I try `wp comment approve {COMMENT_ID}`
Then STDOUT should be:
"""
Expand Down Expand Up @@ -218,7 +218,7 @@ Feature: Manage WordPress comments
And I run `wp comment create --comment_post_ID=1 --porcelain`
And save STDOUT as {COMMENT_ID}

# With site url set.
# With site url set.
When I run `wp comment unapprove {COMMENT_ID} --url=www.example.com`
Then STDOUT should be:
"""
Expand All @@ -243,7 +243,7 @@ Feature: Manage WordPress comments
11
"""

# Without site url set.
# Without site url set.
When I try `wp comment unapprove {COMMENT_ID}`
Then STDOUT should be:
"""
Expand Down Expand Up @@ -272,7 +272,7 @@ Feature: Manage WordPress comments
And I run `wp comment create --comment_post_ID=1 --porcelain`
And save STDOUT as {COMMENT_ID}

# With site url set.
# With site url set.
When I run `wp comment spam {COMMENT_ID}`
Then STDOUT should be:
"""
Expand All @@ -297,7 +297,7 @@ Feature: Manage WordPress comments
0
"""

# Without site url set.
# Without site url set.
When I run `wp comment spam {COMMENT_ID}`
Then STDOUT should be:
"""
Expand All @@ -321,7 +321,7 @@ Feature: Manage WordPress comments
And I run `wp comment create --comment_post_ID=1 --porcelain`
And save STDOUT as {COMMENT_ID}

# With site url set.
# With site url set.
When I run `wp comment trash {COMMENT_ID}`
Then STDOUT should be:
"""
Expand All @@ -346,7 +346,7 @@ Feature: Manage WordPress comments
0
"""

# Without site url set.
# Without site url set.
When I run `wp comment trash {COMMENT_ID}`
Then STDOUT should be:
"""
Expand Down

0 comments on commit 39fcea4

Please sign in to comment.