forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlabels.feature
More file actions
123 lines (100 loc) · 4.46 KB
/
labels.feature
File metadata and controls
123 lines (100 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Feature: Labels API
Background:
Given I have "Github::Client::Issues::Labels" instance
Scenario: List in a repository
Given I want to list resources with the following params:
| user | repo |
| peter-murach | github |
When I make request within a cassette named "issues/labels/list_repo"
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: List in a milestone
Given I want to list resources with the following params:
| user | repo |
| plataformatec| devise |
And I pass the following request options:
| milestone_id |
| 3 |
When I make request within a cassette named "issues/labels/list_milestone"
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: List in an issue
Given I want to list resources with the following params:
| user | repo |
| plataformatec| devise |
And I pass the following request options:
| issue_id |
| 1944 |
When I make request within a cassette named "issues/labels/list_issue"
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: Get
Given I want to get resource with the following params:
| user | repo | label_name |
| peter-murach | github | bug |
When I make request within a cassette named "issues/labels/get"
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: Create
Given I want to create resource with the following params:
| user | repo |
| murek | github_api_test |
And I pass the following request options:
| name | color |
| api | FFFFFF |
When I make request within a cassette named "issues/labels/create" and match on method
Then the response status should be 201
And the response type should be JSON
And the response should not be empty
Scenario: Update
Given I want to update resource with the following params:
| user | repo | label_name |
| murek | github_api_test | api |
And I pass the following request options:
| name | color |
| api | 000000 |
When I make request within a cassette named "issues/labels/update" and match on method
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: Delete
Given I want to delete resource with the following params:
| user | repo | label_name |
| murek | github_api_test | api |
When I make request within a cassette named "issues/labels/delete" and match on method
Then the response status should be 204
Scenario: Add
Given I want to add resource with the following params:
| user | repo | number | label1 |
| murek | github_api_test | 1 | bug |
When I make request within a cassette named "issues/labels/add" and match on method
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: Replace
Given I want to replace resource with the following params:
| user | repo | number | label1 | label 2 |
| murek | github_api_test | 1 | question | duplicate |
When I make request within a cassette named "issues/labels/replace" and match on method
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: Remove a single label
Given I want to remove resource with the following params:
| user | repo | number |
| murek | github_api_test | 1 |
And I pass the following request options:
| lable_name |
| duplicate |
When I make request within a cassette named "issues/labels/remove_one" and match on method
Then the response status should be 204
Scenario: Remove all labels
Given I want to remove resource with the following params:
| user | repo | number |
| murek | github_api_test | 1 |
When I make request within a cassette named "issues/labels/remove_all" and match on method
Then the response status should be 204