Skip to content

Commit

Permalink
handling error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
james-prysm committed Jan 19, 2024
1 parent 1b4f7fd commit a958c85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion validator/rpc/intercepter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func TestServer_JwtHttpInterceptor(t *testing.T) {
testHandler := s.JwtHttpInterceptor(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Your test handler logic here
w.WriteHeader(http.StatusOK)
w.Write([]byte("Test Response"))
_, err := w.Write([]byte("Test Response"))
require.NoError(t, err)
}))
t.Run("no jwt was sent", func(t *testing.T) {
rr := httptest.NewRecorder()
Expand Down

0 comments on commit a958c85

Please sign in to comment.