use require.EqualError() in tests

This commit is contained in:
aler9
2021-11-03 17:52:45 +01:00
parent e3d13be611
commit 78bfa5d6a8
25 changed files with 43 additions and 43 deletions

View File

@@ -157,9 +157,9 @@ func TestServerReadSetupErrors(t *testing.T) {
Handler: &testServerHandler{
onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) {
if ca == "different paths" {
require.Equal(t, "can't setup tracks with different paths", ctx.Error.Error())
require.EqualError(t, ctx.Error, "can't setup tracks with different paths")
} else {
require.Equal(t, "track 0 has already been setup", ctx.Error.Error())
require.EqualError(t, ctx.Error, "track 0 has already been setup")
}
close(connClosed)
},