aboutsummaryrefslogtreecommitdiff
path: root/account_test.go
blob: 369f1b8feb15d5bbb728a1fa27d87c52d4bed87c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package acme

import "testing"

const emtpyKA = ".nby9DvkdEB0ex5-IK3bxu1c1HA_bAHxeYzo-8twil28"

func TestKeyAuth(t *testing.T) {
	a, err := LoadAccount("test.key")
	if err != nil {
		t.Error(err)
	}
	ka, err := a.KeyAuth("")
	if err != nil {
		t.Error(err)
	}
	if ka != emtpyKA {
		t.Error("Got", ka, "expected", emtpyKA)
	}
}