Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
  • Loading branch information
qmuntal committed Oct 6, 2023
1 parent 1368b54 commit 5508600
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,19 @@ func TestProtectedHeader_MarshalCBOR(t *testing.T) {
wantErr: "protected header: header parameter: content type: require no leading/trailing whitespace",
},
{
name: "content type trailing space",
name: "content type no slash",
h: ProtectedHeader{
HeaderLabelContentType: "ab",
},
wantErr: "protected header: header parameter: content type: require text of form type/subtype",
},
{
name: "content type too many slashes",
h: ProtectedHeader{
HeaderLabelContentType: "a/b/c",
},
wantErr: "protected header: header parameter: content type: require text of form type/subtype",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 5508600

Please sign in to comment.