mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
improve coverage
This commit is contained in:
@@ -85,6 +85,26 @@ func TestAuthorizationReadError(t *testing.T) {
|
||||
base.HeaderValue{"a", "b"},
|
||||
"value provided multiple times ([a b])",
|
||||
},
|
||||
{
|
||||
"invalid",
|
||||
base.HeaderValue{`Invalid`},
|
||||
"invalid authorization header",
|
||||
},
|
||||
{
|
||||
"basic invalid 1",
|
||||
base.HeaderValue{`Basic aaa`},
|
||||
"invalid value",
|
||||
},
|
||||
{
|
||||
"basic invalid 2",
|
||||
base.HeaderValue{`Basic aW52YWxpZA==`},
|
||||
"invalid value",
|
||||
},
|
||||
{
|
||||
"digest invalid",
|
||||
base.HeaderValue{`Basic`},
|
||||
"invalid authorization header",
|
||||
},
|
||||
} {
|
||||
t.Run(ca.name, func(t *testing.T) {
|
||||
var h Authorization
|
||||
|
Reference in New Issue
Block a user