Skip to content

Commit 7423a8b

Browse files
committed
Add repository api live tests.
1 parent 4e08b10 commit 7423a8b

2 files changed

Lines changed: 45 additions & 4 deletions

File tree

features/git_data/references.feature

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Feature: Accessing GitData References API
1616
And the response type should be "JSON"
1717
And the response should not be empty
1818

19-
Scenario: Lists all references on a repository
19+
Scenario: Lists all references on a repository scoped by branch
2020
Given I want to list resources with the following params:
2121
| user | repo |
2222
| wycats | thor |
@@ -28,11 +28,22 @@ Feature: Accessing GitData References API
2828
And the response type should be "JSON"
2929
And the response should not be empty
3030

31-
Scenario: Gets a single git data reference
31+
Scenario: Gets a single reference
3232
Given I want to get resource with the following params:
3333
| user | repo | ref |
3434
| wycats | thor | heads/gh-pages |
3535
When I make request within a cassette named "git_data/references/one"
3636
Then the response should be "200"
3737
And the response type should be "JSON"
3838
And the response should not be empty
39+
40+
# Scenario: Create a reference
41+
# Given I want to create resource with the following params:
42+
# | user | repo |
43+
# | murek | github_api_test |
44+
# And I pass the following request options:
45+
# | ref | sha |
46+
# | refs/heads/master | 827efc6d56897b048c772eb4087f854f46256132 |
47+
# When I make request within a cassette named "git_data/references/create"
48+
# Then the response should be "200"
49+
# And the response type should be "JSON"

features/repos.feature

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Feature: Accessing Repos Main API
1313
And I make request within a cassette named "repos/branches"
1414
Then the response should be "200"
1515
And the response type should be "JSON"
16+
And the response should not be empty
1617

1718
Scenario: Returning all repository tags
1819
When I am looking for "tags" with the following params:
@@ -21,12 +22,41 @@ Feature: Accessing Repos Main API
2122
And I make request within a cassette named "repos/tags"
2223
Then the response should be "200"
2324
And the response type should be "JSON"
25+
And the response should not be empty
2426

2527
Scenario: Returning all repositories for the user
26-
When I want to list resources
28+
Given I want to list resources
2729
And I pass the following request options:
2830
| user |
2931
| peter-murach |
30-
And I make request within a cassette named "repos/list"
32+
When I make request within a cassette named "repos/list"
3133
Then the response should be "200"
3234
And the response type should be "JSON"
35+
And the response should not be empty
36+
37+
Scenario: Get a repository
38+
Given I want to get resource with the following params:
39+
| user | repo |
40+
| wycats | thor |
41+
When I make request within a cassette named "repos/get"
42+
Then the response should be "200"
43+
And the response type should be "JSON"
44+
And the response should not be empty
45+
46+
Scenario: Listing repository languages
47+
When I am looking for "languages" with the following params:
48+
| user | repo |
49+
| peter-murach | github |
50+
And I make request within a cassette named "repos/languages"
51+
Then the response should be "200"
52+
And the response type should be "JSON"
53+
54+
Scenario: Create repository
55+
Given I want to create resource
56+
And I pass the following request options:
57+
| name |
58+
| github_api_test |
59+
When I make request within a cassette named "repos/create"
60+
Then the response should be "201"
61+
And the response type should be "JSON"
62+
And the response should not be empty

0 commit comments

Comments
 (0)