fix http frontend tests

This commit is contained in:
Jimmy Zelinskie 2016-08-16 23:43:09 -04:00
parent 66f76a7d48
commit 31a79a1ce2

View file

@ -19,7 +19,7 @@ func TestWriteError(t *testing.T) {
for _, tt := range table {
r := httptest.NewRecorder()
err := writeError(r, bittorrent.ClientError(tt.reason))
err := WriteError(r, bittorrent.ClientError(tt.reason))
assert.Nil(t, err)
assert.Equal(t, r.Body.String(), tt.expected)
}
@ -27,7 +27,7 @@ func TestWriteError(t *testing.T) {
func TestWriteStatus(t *testing.T) {
r := httptest.NewRecorder()
err := writeError(r, bittorrent.ClientError("something is missing"))
err := WriteError(r, bittorrent.ClientError("something is missing"))
assert.Nil(t, err)
assert.Equal(t, r.Body.String(), "d14:failure reason20:something is missinge")
}