mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 06:46:42 +08:00
use require.EqualError() in tests
This commit is contained in:
@@ -603,7 +603,7 @@ func TestServerErrorCSeqMissing(t *testing.T) {
|
||||
|
||||
h := &testServerHandler{
|
||||
onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) {
|
||||
require.Equal(t, "CSeq is missing", ctx.Error.Error())
|
||||
require.EqualError(t, ctx.Error, "CSeq is missing")
|
||||
close(connClosed)
|
||||
},
|
||||
}
|
||||
@@ -635,7 +635,7 @@ func TestServerErrorInvalidMethod(t *testing.T) {
|
||||
|
||||
h := &testServerHandler{
|
||||
onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) {
|
||||
require.Equal(t, "unhandled request (INVALID rtsp://localhost:8554/)", ctx.Error.Error())
|
||||
require.EqualError(t, ctx.Error, "unhandled request (INVALID rtsp://localhost:8554/)")
|
||||
close(connClosed)
|
||||
},
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ func TestServerErrorInvalidPath(t *testing.T) {
|
||||
s := &Server{
|
||||
Handler: &testServerHandler{
|
||||
onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) {
|
||||
require.Equal(t, "invalid path", ctx.Error.Error())
|
||||
require.EqualError(t, ctx.Error, "invalid path")
|
||||
close(connClosed)
|
||||
},
|
||||
onAnnounce: func(ctx *ServerHandlerOnAnnounceCtx) (*base.Response, error) {
|
||||
|
Reference in New Issue
Block a user