mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-19 09:25:37 +00:00
24 lines
471 B
Go
24 lines
471 B
Go
package apiv1
|
|
|
|
import "testing"
|
|
|
|
func TestType_String(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
t Type
|
|
want string
|
|
}{
|
|
{"default", "", "softcas"},
|
|
{"SoftCAS", SoftCAS, "softcas"},
|
|
{"CloudCAS", CloudCAS, "cloudcas"},
|
|
{"UnknownCAS", "UnknownCAS", "unknowncas"},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
if got := tt.t.String(); got != tt.want {
|
|
t.Errorf("Type.String() = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|