Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 42 lines (38 sloc) 1.614 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
Feature: List gems API
In order to see all the gems I work on
A gem owner
Should be able to list their gems

Scenario: Anonymous user lists gems for owner
Given the following user exists:
| email | handle |
| user@example.com | myhandle |
And the following version exists:
| rubygem | number |
| name: AGem | 1.0.0 |
And the following ownership exists:
| rubygem | user |
| name: AGem | email: user@example.com |
| name: BGem | |
When I list the gems for owner "myhandle"
Then I should see "AGem"
And I should not see "BGem"

Scenario: Anonymous user lists gems for unknown user
When I list the gems for owner "nobody"
Then I should see "Owner could not be found."

Scenario: Gem owner user lists their gems
Given I am signed up as "original@owner.org"
And I have an API key for "original@owner.org/password"
And the following version exists:
| rubygem | number |
| name: MyGem | 1.0.0 |
And the following ownership exists:
| rubygem | user |
| name: MyGem | email: original@owner.org |
When I list the gems with my API key
Then I should see "MyGem"

Scenario: Gem versions include all gem version data
Given the following version exists:
| rubygem | number | licenses |
| name: testgemwithlicense | 1.0.0 | MIT |
When I GET "/api/v1/versions/testgemwithlicense.json"
Then the JSON response should include all of the gem version metadata
Something went wrong with that request. Please try again.