send_email_to_environment_members.feature
1.44 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
44
45
Feature: send emails to environment members users
  As an administrator
  I want to send email to all users
  Scenario: Cant access if not logged in
    Given I am not logged in
    When I go to /admin/users/send_mail
    Then I should be on login page
  Scenario: Cant access as normal user
    Given the following user
      | login |
      | ultraje |
    And I am logged in as "ultraje"
    When I go to /admin/users/send_mail
    Then I should see "Access denied"
  Scenario: Send e-mail to members
    Given I am logged in as admin
    And I go to /admin/users/send_mail
    And I fill in "Subject" with "Hello, user!"
    And I fill in "Body" with "We have some news"
    When I press "Send"
    Then I should be on /admin/users
  Scenario: Not send e-mail to members if subject is blank
    Given I am logged in as admin
    And I go to /admin/users/send_mail
    And I fill in "Body" with "We have some news"
    When I press "Send"
    Then I should be on /admin/users/send_mail
  Scenario: Not send e-mail to members if body is blank
    Given I am logged in as admin
    And I go to /admin/users/send_mail
    And I fill in "Subject" with "Hello, user!"
    When I press "Send"
    Then I should be on /admin/users/send_mail
  Scenario: Cancel creation of mailing
    Given I am logged in as admin
    And I go to /admin/users/send_mail
    Then I should be on /admin/users/send_mail
    When I follow "Cancel e-mail"
    Then I should be on /admin/users