Skip to content

Commit d3e35ba

Browse files
committed
Create behat tests for listing a lot of issue categories
1 parent 5977869 commit d3e35ba

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/Behat/Bootstrap/IssueCategoryContextTrait.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@
99

1010
trait IssueCategoryContextTrait
1111
{
12+
/**
13+
* @Given I create :count issue categories for project identifier :identifier
14+
*/
15+
public function iCreateIssueCategoriesForProjectIdentifier(int $count, $identifier)
16+
{
17+
while ($count > 0) {
18+
$this->iCreateAnIssueCategoryForProjectIdentifierAndWithTheName(
19+
$identifier,
20+
'Issue Category ' . $count,
21+
);
22+
23+
$count--;
24+
}
25+
}
26+
1227
/**
1328
* @When I create an issue category for project identifier :identifier and with the name :name
1429
*/

tests/Behat/features/issue_category.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ Feature: Interacting with the REST API for issue categories
158158
| 1 | Category name B |
159159
| 2 | Category name A |
160160

161+
Scenario: Listing a lot of issue category names
162+
Given I have a "NativeCurlClient" client
163+
And I create a project with name "Test Project" and identifier "test-project"
164+
And I create "108" issue categories for project identifier "test-project"
165+
When I list all issue category names for project identifier "test-project"
166+
Then the response has the status code "200"
167+
And the response has the content type "application/json"
168+
And the returned data contains "108" items
169+
161170
Scenario: Updating an issue category with all data
162171
Given I have a "NativeCurlClient" client
163172
And I create a project with name "Test Project" and identifier "test-project"

0 commit comments

Comments
 (0)