@@ -119,7 +119,7 @@ func TestHandlerResponse(t *testing.T) {
119119 message : "should return error on unprocessable request" ,
120120 want : response {
121121 Code : fasthttp .StatusUnsupportedMediaType ,
122- Body : "Unsupported Media Type\n " ,
122+ Body : "Unsupported Media Type" ,
123123 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
124124 },
125125 handler : don .H (func (ctx context.Context , req struct { Hello string }) (any , error ) {
@@ -131,7 +131,7 @@ func TestHandlerResponse(t *testing.T) {
131131 message : "should return error on unacceptable" ,
132132 want : response {
133133 Code : fasthttp .StatusNotAcceptable ,
134- Body : "Not Acceptable\n " ,
134+ Body : "Not Acceptable" ,
135135 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
136136 },
137137 handler : don .H (func (ctx context.Context , req any ) ([]string , error ) {
@@ -143,7 +143,7 @@ func TestHandlerResponse(t *testing.T) {
143143 message : "should return error on unsupported accept" ,
144144 want : response {
145145 Code : fasthttp .StatusNotAcceptable ,
146- Body : "Not Acceptable\n " ,
146+ Body : "Not Acceptable" ,
147147 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
148148 },
149149 handler : don .H (func (ctx context.Context , req any ) (any , error ) {
@@ -155,7 +155,7 @@ func TestHandlerResponse(t *testing.T) {
155155 message : "should return error on unsupported content type" ,
156156 want : response {
157157 Code : fasthttp .StatusUnsupportedMediaType ,
158- Body : "Unsupported Media Type\n " ,
158+ Body : "Unsupported Media Type" ,
159159 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
160160 },
161161 handler : don .H (func (ctx context.Context , req any ) (any , error ) {
@@ -170,7 +170,7 @@ func TestHandlerResponse(t *testing.T) {
170170 message : "should return error on invalid query" ,
171171 want : response {
172172 Code : fasthttp .StatusBadRequest ,
173- Body : "strconv.ParseInt: parsing \" foo\" : invalid syntax\n " ,
173+ Body : "strconv.ParseInt: parsing \" foo\" : invalid syntax" ,
174174 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
175175 },
176176 handler : don .H (func (ctx context.Context , req struct {
@@ -185,7 +185,7 @@ func TestHandlerResponse(t *testing.T) {
185185 message : "should return error on invalid header" ,
186186 want : response {
187187 Code : fasthttp .StatusBadRequest ,
188- Body : "strconv.ParseInt: parsing \" foo\" : invalid syntax\n " ,
188+ Body : "strconv.ParseInt: parsing \" foo\" : invalid syntax" ,
189189 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
190190 },
191191 handler : don .H (func (ctx context.Context , req struct {
@@ -200,7 +200,7 @@ func TestHandlerResponse(t *testing.T) {
200200 message : "should return error on invalid path element" ,
201201 want : response {
202202 Code : fasthttp .StatusNotFound ,
203- Body : "Not Found\n " ,
203+ Body : "Not Found" ,
204204 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
205205 },
206206 handler : don .H (func (ctx context.Context , req struct {
@@ -216,7 +216,7 @@ func TestHandlerResponse(t *testing.T) {
216216 message : "should return error on invalid body" ,
217217 want : response {
218218 Code : fasthttp .StatusBadRequest ,
219- Body : "strconv.Atoi: parsing \" foo\" : invalid syntax\n " ,
219+ Body : "strconv.Atoi: parsing \" foo\" : invalid syntax" ,
220220 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
221221 },
222222 handler : don .H (func (ctx context.Context , req int ) (any , error ) {
@@ -228,7 +228,7 @@ func TestHandlerResponse(t *testing.T) {
228228 message : "should return internal server error" ,
229229 want : response {
230230 Code : fasthttp .StatusInternalServerError ,
231- Body : "test\n " ,
231+ Body : "test" ,
232232 Header : map [string ]string {"Content-Type" : "text/plain; charset=utf-8" },
233233 },
234234 handler : don .H (func (ctx context.Context , req any ) (any , error ) {
0 commit comments