2015-10-06 13:50:26 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								<% providers = @formatter.get_fixture('providers/all').map{|p| "@#{p}"} %>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@key <%= providers.join(" ") %>
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-08 16:48:19 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Feature: Delete key
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-06 13:50:26 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  <% key = @formatter.get_fixture('key/new') %>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Scenario: DELETE key with header 'Accept' value is not 'application/json'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    When I send DELETE '/v2.0/key/<%= key["key_name"] %>' query with header 'Accept' value 'application/xml'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Then response should be '406'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Scenario: Delete key without privileges
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    When I send DELETE '/v2.0/key/<%= key["key_name"] %>' query with user without privileges
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Then response should be '401'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-08 16:48:19 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Scenario: Delete key
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-06 13:50:26 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    When I send DELETE '/v2.0/key/<%= key["key_name"] %>' query
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-08 16:48:19 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Then response should be '200'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    And the Content-Type header should include 'application/json'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    And the JSON response should be an object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 |