cosyn / vek

incredibly simple blog...not worth using for anyone but me

vek / features / comment_moderation.feature
100644 43 lines (38 sloc) 2.14 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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