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