@@ -4,7 +4,6 @@ Feature: Interacting with the REST API for users
44 As a user
55 I want to make sure the Redmine server replies with the correct response
66
7-
87 Scenario : Creating an user
98 Given I have a "NativeCurlClient" client
109 When I create a user with the following data
@@ -45,24 +44,6 @@ Feature: Interacting with the REST API for users
4544 | twofa_scheme | [] |
4645 | status | 1 |
4746
48- Scenario : Updating an user
49- Given I have a "NativeCurlClient" client
50- And I create a user with the following data
51- | property | value |
52- | login | username |
53- | firstname | first |
54- | lastname | last |
55- | mail | mail @example .com |
56- When I update the user with id "5" and the following data
57- | property | value |
58- | firstname | new_first |
59- | lastname | new_last |
60- | mail | new_mail @example .com |
61- Then the response has the status code "204"
62- And the response has an empty content type
63- And the response has the content ""
64- And the returned data is exactly ""
65-
6647 Scenario : Showing a user
6748 Given I have a "NativeCurlClient" client
6849 When I show the user with id "1"
@@ -113,6 +94,123 @@ Feature: Interacting with the REST API for users
11394 And the response has the content ""
11495 And the returned data is false
11596
97+ Scenario : Listing of multiple users
98+ Given I have a "NativeCurlClient" client
99+ And I create a user with the following data
100+ | property | value |
101+ | login | username |
102+ | firstname | first |
103+ | lastname | last |
104+ | mail | mail @example .net |
105+ When I list all users
106+ Then the response has the status code "200"
107+ And the response has the content type "application/json"
108+ And the returned data has only the following properties
109+ """
110+ users
111+ total_count
112+ offset
113+ limit
114+ """
115+ And the returned data has proterties with the following data
116+ | property | value |
117+ | total_count | 2 |
118+ | offset | 0 |
119+ | limit | 25 |
120+ And the returned data "users" property is an array
121+ And the returned data "users" property contains "2" items
122+ And the returned data "users.0" property is an array
123+ And the returned data "users.0" property has only the following properties
124+ """
125+ id
126+ login
127+ admin
128+ firstname
129+ lastname
130+ mail
131+ created_on
132+ updated_on
133+ last_login_on
134+ passwd_changed_on
135+ twofa_scheme
136+ """
137+ And the returned data "users.0" property contains the following data
138+ | property | value |
139+ | id | 1 |
140+ | login | admin |
141+ | admin | true |
142+ | firstname | Redmine |
143+ | lastname | Admin |
144+ | mail | admin @example .net |
145+ | twofa_scheme | null |
146+ And the returned data "users.1" property is an array
147+ And the returned data "users.1" property has only the following properties
148+ """
149+ id
150+ login
151+ admin
152+ firstname
153+ lastname
154+ mail
155+ created_on
156+ updated_on
157+ last_login_on
158+ passwd_changed_on
159+ twofa_scheme
160+ """
161+ And the returned data "users.1" property contains the following data
162+ | property | value |
163+ | id | 5 |
164+ | login | username |
165+ | admin | false |
166+ | firstname | first |
167+ | lastname | last |
168+ | mail | mail @example .net |
169+ | twofa_scheme | null |
170+
171+ Scenario : Listing of multiple user logins
172+ Given I have a "NativeCurlClient" client
173+ And I create a user with the following data
174+ | property | value |
175+ | login | username |
176+ | firstname | first |
177+ | lastname | last |
178+ | mail | mail @example .net |
179+ When I list all user logins
180+ Then the response has the status code "200"
181+ And the response has the content type "application/json"
182+ And the returned data contains "2" items
183+ And the returned data has proterties with the following data
184+ | property | value |
185+ | 1 | admin |
186+ | 5 | username |
187+
188+ Scenario : Listing of multiple user logins
189+ Given I have a "NativeCurlClient" client
190+ And I create "108" users
191+ When I list all user logins
192+ Then the response has the status code "200"
193+ And the response has the content type "application/json"
194+ And the returned data contains "109" items
195+
196+ Scenario : Updating an user
197+ Given I have a "NativeCurlClient" client
198+ And I create a user with the following data
199+ | property | value |
200+ | login | username |
201+ | firstname | first |
202+ | lastname | last |
203+ | mail | mail @example .com |
204+ When I update the user with id "5" and the following data
205+ | property | value |
206+ | firstname | new_first |
207+ | lastname | new_last |
208+ | mail | new_mail @example .com |
209+ Then the response has the status code "204"
210+ And the response has an empty content type
211+ And the response has the content ""
212+ And the returned data is exactly ""
213+
116214 Scenario : Removing an user
117215 Given I have a "NativeCurlClient" client
118216 And I create a user with the following data
0 commit comments