Fix TestRouteNotOK2 with HTTP 405
This commit is contained in:
		
							
								
								
									
										2
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							| @ -4,7 +4,7 @@ | |||||||
| 	"Deps": [ | 	"Deps": [ | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "github.com/julienschmidt/httprouter", | 			"ImportPath": "github.com/julienschmidt/httprouter", | ||||||
| 			"Rev": "7deadb6844d2c6ff1dfb812eaa439b87cdaedf20" | 			"Rev": "90d58bada7e6154006f2728ee09053271154a8f6" | ||||||
| 		} | 		} | ||||||
| 	] | 	] | ||||||
| } | } | ||||||
|  | |||||||
| @ -108,9 +108,8 @@ func testRouteNotOK2(method string, t *testing.T) { | |||||||
| 	if passed == true { | 	if passed == true { | ||||||
| 		t.Errorf(method + " route handler was invoked, when it should not") | 		t.Errorf(method + " route handler was invoked, when it should not") | ||||||
| 	} | 	} | ||||||
| 	if w.Code != http.StatusNotFound { | 	if w.Code != http.StatusMethodNotAllowed { | ||||||
| 		// If this fails, it's because httprouter needs to be updated to at least f78f58a0db | 		t.Errorf("Status code should be %v, was %d. Location: %s", http.StatusMethodNotAllowed, w.Code, w.HeaderMap.Get("Location")) | ||||||
| 		t.Errorf("Status code should be %v, was %d. Location: %s", http.StatusNotFound, w.Code, w.HeaderMap.Get("Location")) |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user