35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
@key
 | 
						|
Feature: Add new script
 | 
						|
 | 
						|
  Scenario: Add new key without file_name
 | 
						|
    When I send POST '/v2.0/key' query with JSON body
 | 
						|
    """
 | 
						|
    <%= @formatter.json('key/invalid/blank_file_name', spaces: 6) %>
 | 
						|
    """
 | 
						|
    Then response should be '400'
 | 
						|
    And response error should be "Parameter 'file_name' must be a not empty string"
 | 
						|
 | 
						|
  Scenario: Add new key without key_name
 | 
						|
    When I send POST '/v2.0/key' query with JSON body
 | 
						|
    """
 | 
						|
    <%= @formatter.json('key/invalid/blank_key_name', spaces: 6) %>
 | 
						|
    """
 | 
						|
    Then response should be '400'
 | 
						|
    And response error should be "Parameter 'key_name' should be a not empty string"
 | 
						|
 | 
						|
  Scenario: Add new key without content
 | 
						|
    When I send POST '/v2.0/key' query with JSON body
 | 
						|
    """
 | 
						|
    <%= @formatter.json('key/invalid/blank_content', spaces: 6) %>
 | 
						|
    """
 | 
						|
    Then response should be '400'
 | 
						|
    And response error should be "Parameter 'content' should be a not empty string"
 | 
						|
 | 
						|
  Scenario: Add new key
 | 
						|
    When I send POST '/v2.0/key' query with JSON body
 | 
						|
    """
 | 
						|
    <%= @formatter.json('key/valid', spaces: 6) %>
 | 
						|
    """
 | 
						|
    Then response should be '201'
 | 
						|
 |