Sha256: bc45a2d90946848a20deefe180495f6d131d56a1d68d36ea0106ddbd90928c32

Contents?: true

Size: 1.6 KB

Versions: 18

Compression:

Stored size: 1.6 KB

Contents

@api
Feature: Asset management API

  @no-api-auth @allow-rescue
  Scenario Outline: Authentication required
    When I <verb> "<path>"
    Then the response should be 401 "Not Authorized"
    When I repeat the request with a valid access token
    Then the response should not be 401 "Not Authorized"

    Examples:
      | verb   | path                   |
      | GET    | /api/assets            |
      | GET    | /api/assets/1          |
      | POST   | /api/assets            |

  Scenario: Getting all assets
    Given 3 assets
    When  I GET "/api/assets"
    Then  the response should contain 3 "assets"

  Scenario: Getting multiple assets by ID
    Given 3 assets
    When  I GET "/api/assets?ids[]={{@assets[0].id}}&ids[]={{@assets[1].id}}"
    Then  the response should contain 2 "assets"

  Scenario: Searching by asset name
    Given 2 assets named "panda" and "disclaimer"
    When  I GET "/api/assets?search[name]=p"
    Then  the response should contain 1 "assets"
    And   the JSON at "assets/0/name" should be "panda"

  Scenario: Uploading a new asset
    When I POST an asset to "/api/assets"
    Then the response should be 201 "Created"
    And  the response should contain an "asset"
    When I follow the "Location" header
    Then the response should contain the same "asset"

  Scenario: Uploading a pre-existing asset, based on SHA
    Given an asset
    When  I POST that asset to "/api/assets" again
    Then  the response should be 301 "Moved Permanently"
    And   the response body should be empty
    When  I follow the "Location" header
    Then  the response should contain the original "asset"

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
landable-1.14.0 features/api/assets.feature
landable-1.13.2 features/api/assets.feature
landable-1.13.1 features/api/assets.feature
landable-1.12.3 features/api/assets.feature
landable-1.12.2 features/api/assets.feature
landable-1.12.1 features/api/assets.feature
landable-1.11.1 features/api/assets.feature
landable-1.11.0 features/api/assets.feature
landable-1.10.0.rc2 features/api/assets.feature
landable-1.10.0.rc1 features/api/assets.feature
landable-1.9.2 features/api/assets.feature
landable-1.9.1 features/api/assets.feature
landable-1.9.0 features/api/assets.feature
landable-1.9.0.rc2 features/api/assets.feature
landable-1.9.0.rc1 features/api/assets.feature
landable-1.8.0 features/api/assets.feature
landable-1.7.1.rc1 features/api/assets.feature
landable-1.7.0 features/api/assets.feature