the content type header set by metrics handler is a bit complicated
but it must start with "text/plain" in any case
|
f . Expect ( func ( F * frisby . Frisby ) ( bool , string ) {
header := F . Resp . Header . Get ( contentTypeHeader )
if strings . HasPrefix ( header , "text/plain" ) {
return true , server . OkStatusPayload
}
return false , fmt . Sprintf ( "Expected Header %q to be %q, but got %q" , contentTypeHeader , "text/plain" , header )
} )
f . PrintReport ( )
}
|