summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/client_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/client_test.go b/client/client_test.go
index b6af2b9..a724857 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -9,13 +9,12 @@ import (
)
func TestEncode(t *testing.T) {
- var hf http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("response"))
- }
- server := httptest.NewServer(hf)
+ }))
defer server.Close()
- c := CaesarClient{Endpoint: server.URL} // HL
- r, err := c.EncodeMessage(strings.NewReader("secret message"))
+ client := CaesarClient{Endpoint: server.URL} // HL
+ r, err := client.EncodeMessage(strings.NewReader("secret message"))
if err != nil {
t.Errorf("should not have gotten error: %v", err)
}