Skip to content

Commit

Permalink
Merge branch 'MDL-38954_master' of git://github.com/dmonllao/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 9, 2013
2 parents 696facb + c246015 commit 8516f27
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions message/tests/behat/block_users.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@core_message
Feature: Block users from contacting me
In order to block other users
As a moodle user
I need to prevent specific users to sending me messages

@javascript
Scenario: Block users from contacting me with Javascript enabled
Given the following "users" exists:
| username | firstname | lastname | email |
| user1 | User | One | one@asd.com |
| user2 | User | Two | two@asd.com |
And I log in as "user1"
And I expand "My profile" node
And I follow "Messages"
And I fill in "Search people and messages" with "User Two"
And I press "Search people and messages"
When I click on "Block contact" "link" in the "User Two" table row
Then the "Message navigation:" select box should contain "Blocked users (1)"
And I select "Blocked users (1)" from "Message navigation:"
And I should see "User Two"
And I log out
And I log in as "user2"
And I expand "My profile" node
And I follow "Messages"
And I fill in "Search people and messages" with "User One"
And I press "Search people and messages"
And I follow "Send message to User One"
And I should see "This user has blocked you from sending messages to them"

0 comments on commit 8516f27

Please sign in to comment.