mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
This commit is contained in:
		
				
					committed by
					
						 Kim "BKC" Carlbäcker
						Kim "BKC" Carlbäcker
					
				
			
			
				
	
			
			
			
						parent
						
							5651cc7413
						
					
				
				
					commit
					f1adaef458
				
			| @@ -23,9 +23,9 @@ func assertProtectedBranch(t *testing.T, repoID int64, branchName string, isErr, | ||||
| 	t.Log(reqURL) | ||||
| 	req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", setting.InternalToken)) | ||||
|  | ||||
| 	resp := MakeRequest(req) | ||||
| 	resp := MakeRequest(t, req, NoExpectedStatus) | ||||
| 	if isErr { | ||||
| 		assert.EqualValues(t, 500, resp.HeaderCode) | ||||
| 		assert.EqualValues(t, http.StatusInternalServerError, resp.HeaderCode) | ||||
| 	} else { | ||||
| 		assert.EqualValues(t, http.StatusOK, resp.HeaderCode) | ||||
| 		var branch models.ProtectedBranch | ||||
|   | ||||
		Reference in New Issue
	
	Block a user