66 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			66 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|   | @project <%= @formatter.get_fixture('providers/all').map{|p| "@" + p}.join(" ") %> | ||
|  | Feature: Update project | ||
|  | 
 | ||
|  |   <% project = @formatter.get_fixture('project/new') %> | ||
|  |   <% project_update = @formatter.get_fixture('project/update') %> | ||
|  |   <% generate_update_path_scenarios "Update project", "/v3/project/" + project["id"], project_update do %> | ||
|  |     And the JSON response should be an object | ||
|  |   <% end %> | ||
|  | 
 | ||
|  |   Scenario: Archive project '<%= project["id"] %>' | ||
|  |     When I send POST '/v3/project/<%= project["id"] %>/archive' query | ||
|  |     Then response should be '200' | ||
|  |     And the Content-Type header should include 'application/json' | ||
|  |     And the JSON response should be an object | ||
|  | 
 | ||
|  |   Scenario: Unarchive project '<%= project["id"] %>' | ||
|  |     When I send POST '/v3/project/<%= project["id"] %>/unarchive' query | ||
|  |     Then response should be '200' | ||
|  |     And the Content-Type header should include 'application/json' | ||
|  |     And the JSON response should be an object | ||
|  | 
 | ||
|  |   Scenario: Set project run_list '<%= project["id"] %>' | ||
|  |     When I send POST '/v3/project/<%= project["id"] %>/run_list/add' query with JSON body | ||
|  |     ``` | ||
|  |     [ | ||
|  |       "role[my_role]" | ||
|  |     ] | ||
|  |     ``` | ||
|  |     Then response should be '200' | ||
|  |     And the Content-Type header should include 'application/json' | ||
|  |     And the JSON response should be an object | ||
|  | 
 | ||
|  |   Scenario: Set project run_list '<%= project["id"] %>' | ||
|  |     When I send POST '/v3/project/<%= project["id"] %>/run_list/delete' query with JSON body | ||
|  |     ``` | ||
|  |     [ | ||
|  |       "role[my_role]" | ||
|  |     ] | ||
|  |     ``` | ||
|  |     Then response should be '200' | ||
|  |     And the Content-Type header should include 'application/json' | ||
|  |     And the JSON response should be an object | ||
|  | 
 | ||
|  |   Scenario: Set project run_list '<%= project["id"] %>' | ||
|  |     When I send PUT '/v3/project/<%= project["id"] %>/run_list' query with JSON body | ||
|  |     ``` | ||
|  |     [ | ||
|  |       "role[my_role1]" | ||
|  |     ] | ||
|  |     ``` | ||
|  |     Then response should be '200' | ||
|  |     And the Content-Type header should include 'application/json' | ||
|  |     And the JSON response should be an object | ||
|  | 
 | ||
|  |   Scenario: Set project run_list '<%= project["id"] %>', invalid run list | ||
|  |     When I send PUT '/v3/project/<%= project["id"] %>/run_list' query with JSON body | ||
|  |     ``` | ||
|  |     [ | ||
|  |       "role[my_role-invalid" | ||
|  |     ] | ||
|  |     ``` | ||
|  |     Then response should be '422' | ||
|  |     And the Content-Type header should include 'application/json' | ||
|  |     And the JSON response should be an object | ||
|  | 
 |