aboutsummaryrefslogtreecommitdiff
path: root/server/certutil/util_test.go
blob: abb8f10d1b9d756e8d5593ae76aec0b4f5925289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package certutil

import (
	"testing"

	"github.com/nsheridan/cashier/testdata"
	"golang.org/x/crypto/ssh"
)

func TestGetPublicKey(t *testing.T) {
	c, _, _, _, _ := ssh.ParseAuthorizedKey(testdata.Cert)
	if GetPublicKey(c.(*ssh.Certificate)) != string(testdata.Cert) {
		t.Fail()
	}
}