-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathpull_request.feature
More file actions
79 lines (69 loc) · 2.33 KB
/
Copy pathpull_request.feature
File metadata and controls
79 lines (69 loc) · 2.33 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
Feature: gcli pull request
@ci-run
Scenario: Available commands
When I run `gcli pull`
Then the exit status should be 0
And the output should contain "pull commits"
And the output should contain "pull create"
And the output should contain "pull files"
And the output should contain "pull get"
And the output should contain "pull list"
And the output should contain "pull merge"
And the output should contain "pull merged"
And the output should contain "pull update"
Scenario: List pull requests
Given the GitHub API server:
"""
get('/repos/wycats/thor/pulls') { status 200 }
"""
When I run `gcli pull ls wycats thor`
Then the exit status should be 0
Scenario: Get pull request
Given the GitHub API server:
"""
get('/repos/wycats/thor/pulls/1') { status 200 }
"""
When I run `gcli pull get wycats thor 1`
Then the exit status should be 0
Scenario: Create pull request
Given the GitHub API server:
"""
post('/repos/wycats/thor/pulls') { status 200 }
"""
When I run `gcli pull create wycats thor --params=title:'Amazing new feauture'`
Then the exit status should be 0
Scenario: Update pull request
Given the GitHub API server:
"""
patch('/repos/wycats/thor/pulls/1') { status 200 }
"""
When I run `gcli pull update wycats thor 1 --params=title:'Amazing update'`
Then the exit status should be 0
Scenario: Commits on pull request
Given the GitHub API server:
"""
get('/repos/wycats/thor/pulls/1/commits') { status 200 }
"""
When I run `gcli pull commits wycats thor 1`
Then the exit status should be 0
Scenario: Files on pull request
Given the GitHub API server:
"""
get('/repos/wycats/thor/pulls/1/files') { status 200 }
"""
When I run `gcli pull files wycats thor 1`
Then the exit status should be 0
Scenario: Check if pull request has been merged
Given the GitHub API server:
"""
get('/repos/wycats/thor/pulls/1/merge') { status 200 }
"""
When I run `gcli pull merged wycats thor 1`
Then the exit status should be 0
Scenario: Merge pull request
Given the GitHub API server:
"""
put('/repos/wycats/thor/pulls/1/merge') { status 200 }
"""
When I run `gcli pull merge wycats thor 1`
Then the exit status should be 0