mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	Make test case less dependent on exact error string (#741)
This commit is contained in:
		
							parent
							
								
									ed8a48e7f1
								
							
						
					
					
						commit
						004a7f84ef
					
				@ -52,7 +52,13 @@ func TestInclude(t *testing.T) {
 | 
				
			|||||||
			fileContent:          `str1 {{ .InvalidField }} str2`,
 | 
								fileContent:          `str1 {{ .InvalidField }} str2`,
 | 
				
			||||||
			expectedContent:      "",
 | 
								expectedContent:      "",
 | 
				
			||||||
			shouldErr:            true,
 | 
								shouldErr:            true,
 | 
				
			||||||
			expectedErrorContent: `InvalidField is not a field of struct type middleware.Context`,
 | 
								expectedErrorContent: `InvalidField`,
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								fileContent:          `str1 {{ .InvalidField }} str2`,
 | 
				
			||||||
 | 
								expectedContent:      "",
 | 
				
			||||||
 | 
								shouldErr:            true,
 | 
				
			||||||
 | 
								expectedErrorContent: `type middleware.Context`,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user