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

import (
	"reflect"
	"testing"

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

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