Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-07-17 11:03:55 +02:00
Родитель e263e4565b
Коммит 1bfe3c847d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E166FD8976B3BAC8
2 изменённых файлов: 34 добавлений и 0 удалений

Просмотреть файл

@ -146,6 +146,18 @@ class FeatureContext implements Context, SnippetAcceptingContext {
$this->assertStatusCode($this->response, 200);
}
/**
* @Then /^user "([^"]*)" pings room "([^"]*)" (unsuccessfully|successfully)$/
*
* @param string $user
* @param string $identifier
*/
public function userPingsRoom($user, $identifier) {
$this->setCurrentUser($user);
$this->sendingToWith('DELETE', '/apps/spreed/api/v1/room/' . self::$identifierToToken[$identifier]);
$this->assertStatusCode($this->response, 200);
}
/**
* Parses the xml answer to get the array of users returned.
* @param ResponseInterface $response

Просмотреть файл

@ -2,10 +2,12 @@ Feature: one-to-one
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
Scenario: User has no rooms
Then user "participant1" is participant of the following rooms
Then user "participant2" is participant of the following rooms
Then user "participant3" is participant of the following rooms
Scenario: User1 invites user2 to a one2one room and leaves it
When user "participant1" creates room "room1"
@ -17,6 +19,7 @@ Feature: one-to-one
And user "participant2" is participant of the following rooms
| id | type | participantType | participants |
| room1 | 1 | 1 | participant1, participant2 |
And user "participant3" is participant of the following rooms
And user "participant1" leaves room "room1"
Then user "participant1" is participant of the following rooms
And user "participant2" is participant of the following rooms
@ -31,6 +34,7 @@ Feature: one-to-one
And user "participant2" is participant of the following rooms
| id | type | participantType | participants |
| room2 | 1 | 1 | participant1, participant2 |
And user "participant3" is participant of the following rooms
And user "participant1" deletes room "room2"
Then user "participant1" is participant of the following rooms
And user "participant2" is participant of the following rooms
@ -45,6 +49,24 @@ Feature: one-to-one
And user "participant2" is participant of the following rooms
| id | type | participantType | participants |
| room3 | 1 | 1 | participant1, participant2 |
And user "participant3" is participant of the following rooms
And user "participant1" removes "participant2" from room "room3"
Then user "participant1" is participant of the following rooms
And user "participant2" is participant of the following rooms
Scenario: User1 invites user2 to a one2one room and they ping it
When user "participant1" creates room "room4"
| roomType | 1 |
| invite | participant2 |
And user "participant1" is participant of the following rooms
| id | type | participantType | participants |
| room4 | 1 | 1 | participant1, participant2 |
And user "participant2" is participant of the following rooms
| id | type | participantType | participants |
| room4 | 1 | 1 | participant1, participant2 |
And user "participant3" is participant of the following rooms
Then user "participant1" pings room "room4" successfully
And user "participant2" pings room "room4" successfully
And user "participant3" pings room "room4" unsuccessfully
And user "participant1" deletes room "room4"