aboutsummaryrefslogtreecommitdiff
path: root/account_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'account_test.go')
-rw-r--r--account_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/account_test.go b/account_test.go
new file mode 100644
index 0000000..369f1b8
--- /dev/null
+++ b/account_test.go
@@ -0,0 +1,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)
+ }
+}