 b70165c3b4
			
		
	
	
		b70165c3b4
		
	
	
	
	
		
			
			fixed role name new field validators without validate fields types fixed error with user parser todo: project tests returned some tests, users fixed some more tests: filters images tests network tests keys tests test generator fixed run_list validator
		
			
				
	
	
		
			22 lines
		
	
	
		
			608 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			608 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| class PathScenariosGenerator
 | |
| 
 | |
|   def generate_get_path_scenarios name, path
 | |
|     %Q(
 | |
|   Scenario: #{name}
 | |
|     When I send GET '#{path}' query with JSON body
 | |
|     Then response should be '200'
 | |
|     And the Content-Type header should include 'application/json'
 | |
|     #{yield}
 | |
| 
 | |
|   Scenario: #{name} with header 'Accept' value is not 'application/json'
 | |
|     When I send GET '#{path}' query with header 'Accept' value 'application/xml'
 | |
|     Then response should be '406'
 | |
| 
 | |
|   Scenario: #{name} without privileges
 | |
|     When I send GET '#{path}' query with user without privileges
 | |
|     Then response should be '401'
 | |
| )
 | |
|   end
 | |
| 
 | |
| end
 |