Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Angamanga committed Jan 27, 2020
2 parents 5e132cd + f2e61fc commit e4a93e5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 64 deletions.
72 changes: 37 additions & 35 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion routes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
'middleware' => ['scope:media', 'expiration']
], function () use ($router) {
// Public access
$router->get('/', 'MediaController@index');
// Disabled since there is no use for it and it brings rackspace down when we get the real filename of an image
// $router->get('/', 'MediaController@index');
$router->get('/{id}', 'MediaController@show');
// Public can upload media
$router->post('/', 'MediaController@store');
Expand Down
28 changes: 0 additions & 28 deletions tests/integration/media.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,34 +78,6 @@ Feature: Testing the Media API
And the response has a "errors" property
Then the guzzle status code should be 404

@resetFixture
Scenario: Listing all Media
Given that I want to get all "Media"
When I request "/media"
Then the response is JSON
And the response has a "count" property
And the type of the "count" property is "numeric"
And the "count" property equals "4"
Then the guzzle status code should be 200

@resetFixture
Scenario: Listing All Media with limit and offset
Given that I want to get all "Media"
And that the request "query string" is:
"""
limit=1&offset=1
"""
When I request "/media"
Then the response is JSON
And the response has a "count" property
And the type of the "count" property is "numeric"
And the "count" property equals "1"
And the response has a "next" property
And the response has a "prev" property
And the response has a "curr" property
And the "results.0.id" property equals "2"
Then the guzzle status code should be 200

Scenario: Fail to delete a non existent Media
Given that I want to delete a "Media"
And that its "id" is "10"
Expand Down

0 comments on commit e4a93e5

Please sign in to comment.