File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
package mdm
2
2
3
- import "testing"
3
+ import (
4
+ "testing"
5
+ )
4
6
5
7
func assertError (t * testing.T , err error ) {
6
8
t .Helper ()
@@ -31,8 +33,11 @@ func TestExtractRFC9440(t *testing.T) {
31
33
_ , err = ExtractRFC9440 (":INVALID:" )
32
34
assertError (t , err )
33
35
34
- _ , err = ExtractRFC9440 (certRFC9440 )
36
+ cert , err : = ExtractRFC9440 (certRFC9440 )
35
37
assertNilError (t , err )
38
+ if cert == nil {
39
+ t .Error ("expected cert" )
40
+ }
36
41
}
37
42
38
43
func TestQueryEscapedPEM (t * testing.T ) {
@@ -45,6 +50,9 @@ func TestQueryEscapedPEM(t *testing.T) {
45
50
_ , err = ExtractQueryEscapedPEM ("INVALID" )
46
51
assertError (t , err )
47
52
48
- _ , err = ExtractQueryEscapedPEM (certQueryEscaped )
53
+ cert , err : = ExtractQueryEscapedPEM (certQueryEscaped )
49
54
assertNilError (t , err )
55
+ if cert == nil {
56
+ t .Error ("expected cert" )
57
+ }
50
58
}
You can’t perform that action at this time.
0 commit comments