@@ -82,6 +82,92 @@ Feature: Interacting with the REST API for issue categories
8282 | id | 1 |
8383 | name | Redmine Admin |
8484
85+ Scenario : Listing of zero issue categories
86+ Given I have a "NativeCurlClient" client
87+ And I create a project with name "Test Project" and identifier "test-project"
88+ When I list all issue categories for project identifier "test-project"
89+ Then the response has the status code "200"
90+ And the response has the content type "application/json"
91+ And the returned data has only the following properties
92+ """
93+ issue_categories
94+ total_count
95+ """
96+ And the returned data contains the following data
97+ | property | value |
98+ | issue_categories | [] |
99+ | total_count | 0 |
100+
101+ Scenario : Listing of multiple issue categories
102+ Given I have a "NativeCurlClient" client
103+ And I create a project with name "Test Project" and identifier "test-project"
104+ And I create an issue category for project identifier "test-project" and with the following data
105+ | property | value |
106+ | name | Category name B |
107+ And I create an issue category for project identifier "test-project" and with the following data
108+ | property | value |
109+ | name | Category name A |
110+ When I list all issue categories for project identifier "test-project"
111+ Then the response has the status code "200"
112+ And the response has the content type "application/json"
113+ And the returned data has only the following properties
114+ """
115+ issue_categories
116+ total_count
117+ """
118+ And the returned data contains the following data
119+ | property | value |
120+ | total_count | 2 |
121+ And the returned data "issue_categories" property is an array
122+ And the returned data "issue_categories" property contains "2" items
123+ And the returned data "issue_categories.0" property is an array
124+ And the returned data "issue_categories.0" property has only the following properties
125+ """
126+ id
127+ project
128+ name
129+ """
130+ And the returned data "issue_categories.0" property contains the following data
131+ | property | value |
132+ | id | 2 |
133+ | name | Category name A |
134+ And the returned data "issue_categories.0.project" property contains the following data
135+ | property | value |
136+ | id | 1 |
137+ | name | Test Project |
138+ And the returned data "issue_categories.1" property is an array
139+ And the returned data "issue_categories.1" property has only the following properties
140+ """
141+ id
142+ project
143+ name
144+ """
145+ And the returned data "issue_categories.1" property contains the following data
146+ | property | value |
147+ | id | 1 |
148+ | name | Category name B |
149+ And the returned data "issue_categories.1.project" property contains the following data
150+ | property | value |
151+ | id | 1 |
152+ | name | Test Project |
153+
154+ Scenario : Listing of multiple issue category names
155+ Given I have a "NativeCurlClient" client
156+ And I create a project with name "Test Project" and identifier "test-project"
157+ And I create an issue category for project identifier "test-project" and with the following data
158+ | property | value |
159+ | name | Category name B |
160+ And I create an issue category for project identifier "test-project" and with the following data
161+ | property | value |
162+ | name | Category name A |
163+ When I list all issue category names for project identifier "test-project"
164+ Then the response has the status code "200"
165+ And the response has the content type "application/json"
166+ And the returned data contains the following data
167+ | property | value |
168+ | 1 | Category name B |
169+ | 2 | Category name A |
170+
85171 Scenario : Updating an issue category with all data
86172 Given I have a "NativeCurlClient" client
87173 And I create a project with name "Test Project" and identifier "test-project"
0 commit comments