Sha256: e345ceff71f57b544b5fd337d1eaca42ccbf5fcbc2b9f968bf227dc0d922fe78

Contents?: true

Size: 1.25 KB

Versions: 17

Compression:

Stored size: 1.25 KB

Contents

@api
Feature: Templates API
  Scenario: List all templates
    Given there are 3 templates
    When  I GET "/api/templates"
    Then  the response status should be 200
    And   the response should contain 3 "templates"

  Scenario: Create a new template
    When I POST "/api/templates":
      """
      {
        "template": {
          "name": "A template name!",
          "description": "A beautiful template",
          "body": "<div>body</div>",
          "thumbnail_url": "http://foo/bar.jpg"
        }
      }
      """
    Then the response should be 201 "Created"
    And  the JSON at "template/name" should be "A template name!"
    When I follow the "Location" header
    Then the JSON at "template/name" should be "A template name!"

  Scenario: Update a template
    Given a template
    When  I PATCH "/api/templates/{{@template.id}}":
      """
      { "template": { "name": "New day new name" } }
      """
    Then the response should be 200 "OK"
    And  the JSON at "template/name" should be "New day new name"

  Scenario: Publish a template
    Given a template
    When I POST "/api/templates/{{@template.id}}/publish"
    Then the response should be 201 "Created"
    And  the JSON at "template/published_revision_id" should be a template revision's ID

Version data entries

17 entries across 17 versions & 1 rubygems

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