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

import (
	"testing"

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

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