Feature: Comment moderation
As an authenticated user of the site
I should be able to moderate comments posted on the site
So that the content of the site remains pertinent and valuable to the visitors.
Scenario: Navigating to the comment administration page
Given I have signed in as user "jenny" with a password of "password"
When I go to the admin dashboard
Then I should see a link to the comment moderation area
Scenario: Viewing the list of comments on the site when no comments exist
Given I have signed in as user "jenny" with a password of "password"
And there are no comments
When I go to the comment moderation page
Then I should be notified that there are no comments
Scenario: Viewing the list of comments on the site when comments exist
Given I have signed in as user "jenny" with a password of "password"
And the following comments exist:
|article_id | author |body |
|1 | Jack |I like this post |
|1 | Anonymous |This is very nice |
|1 | Jill |This is horrible |
When I go to the comment moderation page
Then I should see a list of comments
And I should see "I like this post"
And I should see "This is very nice"
And I should see "This is horrible"
Scenario: Deleting a comment from the list of comments in the admin interface
Given I have signed in as user "jenny" with a password of "password"
And the following comments exist:
|article_id | author |body |
|1 | Jack |I like this post |
|1 | Anonymous |This is very nice |
|1 | Jill |This is horrible |
When I go to the comment moderation page
When I delete the comment with the body "I like this post"
Then I should not see "I like this post"
And I should see "This is very nice"
And I should see "This is horrible"
And there should be a "notice" message