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

import (
	"reflect"
	"testing"

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

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