|
| 1 | +@role |
| 2 | +Feature: Interacting with the REST API for roles |
| 3 | + In order to interact with REST API for roles |
| 4 | + As a user |
| 5 | + I want to make sure the Redmine server replies with the correct response |
| 6 | + |
| 7 | + Scenario: Listing of zero roles |
| 8 | + Given I have a "NativeCurlClient" client |
| 9 | + When I list all roles |
| 10 | + Then the response has the status code "200" |
| 11 | + And the response has the content type "application/json" |
| 12 | + And the returned data has only the following properties |
| 13 | + """ |
| 14 | + roles |
| 15 | + """ |
| 16 | + And the returned data "roles" property is an array |
| 17 | + And the returned data "roles" property contains "0" items |
| 18 | + |
| 19 | + Scenario: Listing of multiple roles |
| 20 | + Given I have a "NativeCurlClient" client |
| 21 | + And I have a role with the name "Reporter" |
| 22 | + And I have a role with the name "Developer" |
| 23 | + When I list all roles |
| 24 | + Then the response has the status code "200" |
| 25 | + And the response has the content type "application/json" |
| 26 | + And the returned data has only the following properties |
| 27 | + """ |
| 28 | + roles |
| 29 | + """ |
| 30 | + And the returned data "roles" property is an array |
| 31 | + And the returned data "roles" property contains "2" items |
| 32 | + And the returned data "roles.0" property contains "2" items |
| 33 | + And the returned data "roles.0" property contains the following data |
| 34 | + | property | value | |
| 35 | + | id | 3 | |
| 36 | + | name | Reporter | |
| 37 | + And the returned data "roles.1" property contains "2" items |
| 38 | + And the returned data "roles.1" property contains the following data |
| 39 | + | property | value | |
| 40 | + | id | 4 | |
| 41 | + | name | Developer | |
| 42 | + |
| 43 | + Scenario: Listing of multiple role names |
| 44 | + Given I have a "NativeCurlClient" client |
| 45 | + And I have a role with the name "Reporter" |
| 46 | + And I have a role with the name "Developer" |
| 47 | + When I list all role names |
| 48 | + Then the response has the status code "200" |
| 49 | + And the response has the content type "application/json" |
| 50 | + And the returned data is an array |
| 51 | + And the returned data contains "2" items |
| 52 | + And the returned data contains the following data |
| 53 | + | property | value | |
| 54 | + | 3 | Reporter | |
| 55 | + | 4 | Developer | |
0 commit comments