@stack_template @project @stack
Feature: Stack templates

  Scenario: Add new stack_template with user without privileges
    When I send POST '/v2.0/stack_template' query with JSON body with user without privileges
    """
      <%= @formatter.json('stack_template/openstack/valid', spaces: 6) %>
    """
    Then response should be '401'

  <% openstack_template_id = @fixtures['stack_template']['openstack']['valid']['id'] %>
  @openstack
  Scenario: Add openstack stack_template
    When I send POST '/v2.0/stack_template' query with JSON body
    """
      <%= @formatter.json('stack_template/openstack/valid', spaces: 6) %>
    """
    Then response should be '201'
    And the Content-Type header should include 'application/json'
    And response should be JSON object like:
    """
    {
      "id": "<%= openstack_template_id %>"
    }
    """
