-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathreference.feature
More file actions
61 lines (52 loc) · 1.78 KB
/
Copy pathreference.feature
File metadata and controls
61 lines (52 loc) · 1.78 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
Feature: gcli ref
@ci-run
Scenario: Available commands
When I run `gcli ref`
Then the exit status should be 0
And the output should contain "ref create"
And the output should contain "ref delete"
And the output should contain "ref get"
And the output should contain "ref list"
And the output should contain "ref update"
Scenario: List all references
Given the GitHub API server:
"""
get('/repos/wycats/thor/git/refs') { status 200 }
"""
When I run `gcli ref list wycats thor`
Then the exit status should be 0
Scenario: List branch references
Given the GitHub API server:
"""
get('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
"""
When I run `gcli ref list wycats thor --ref=7d1b31e`
Then the exit status should be 0
Scenario: Get reference
Given the GitHub API server:
"""
get('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
"""
When I run `gcli ref list wycats thor 7d1b31e`
Then the exit status should be 0
Scenario: Create reference
Given the GitHub API server:
"""
post('/repos/wycats/thor/git/refs') { status 200 }
"""
When I run `gcli ref create wycats thor --ref=refs/heads/master --sha=827efc6d5`
Then the exit status should be 0
Scenario: Update reference
Given the GitHub API server:
"""
patch('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
"""
When I run `gcli ref update wycats thor 7d1b31e --force --sha=827efc6d5`
Then the exit status should be 0
Scenario: Delete reference
Given the GitHub API server:
"""
delete('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
"""
When I run `gcli ref delete wycats thor 7d1b31e --params=ref:refs/heads/master`
Then the exit status should be 0