aboutsummaryrefslogtreecommitdiff
path: root/client/client_test.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2018-08-09 20:47:50 +0100
committerNiall Sheridan <nsheridan@gmail.com>2018-08-09 23:55:14 +0100
commitd21fac6f190c1079ca247658530d465ad5867ff5 (patch)
tree568d5095602809c7edae3ff4272a68bfb015fe45 /client/client_test.go
parent347c11ec42264c579eb3f19494e4f75ab8bb8f0d (diff)
Only request a reason from the client if the server requires it
Diffstat (limited to 'client/client_test.go')
-rw-r--r--client/client_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/client_test.go b/client/client_test.go
index fddd543..2447db3 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -67,7 +67,7 @@ func TestSignGood(t *testing.T) {
fmt.Fprintln(w, string(j))
}))
defer ts.Close()
- _, err := send([]byte(`{}`), "token", ts.URL, true)
+ _, err := send(&lib.SignRequest{}, "token", ts.URL, true)
if err != nil {
t.Error(err)
}
@@ -79,7 +79,7 @@ func TestSignGood(t *testing.T) {
CA: ts.URL,
Validity: "24h",
}
- cert, err := Sign(k, "token", "message", c)
+ cert, err := Sign(k, "token", c)
if cert == nil && err != nil {
t.Error(err)
}
@@ -95,7 +95,7 @@ func TestSignBad(t *testing.T) {
fmt.Fprintln(w, string(j))
}))
defer ts.Close()
- _, err := send([]byte(`{}`), "token", ts.URL, true)
+ _, err := send(&lib.SignRequest{}, "token", ts.URL, true)
if err != nil {
t.Error(err)
}
@@ -107,7 +107,7 @@ func TestSignBad(t *testing.T) {
CA: ts.URL,
Validity: "24h",
}
- cert, err := Sign(k, "token", "message", c)
+ cert, err := Sign(k, "token", c)
if cert != nil && err == nil {
t.Error(err)
}