Add lock to fake handler to avoid races.

This commit is contained in:
Daniel Smith
2014-10-15 17:46:28 -07:00
parent f61d434783
commit 15c5012933
2 changed files with 24 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ func (f *fakeError) Errorf(format string, args ...interface{}) {
f.errors = append(f.errors, format)
}
func (f *fakeError) Logf(format string, args ...interface{}) {}
func TestFakeHandlerWrongPath(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)