blob: 8aff1b1c50613ca77cd543c341266147a5bcf0b1 [file] [log] [blame]
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux
package main
import (
"net/http/httptest"
"testing"
)
func TestHandleBuilders(t *testing.T) {
rec := httptest.NewRecorder()
handleBuilders(rec, httptest.NewRequest("GET", "/builders", nil))
res := rec.Result()
if res.StatusCode != 200 {
t.Fatalf("Want 200 OK. Got status: %v, %s", res.Status, rec.Body.Bytes())
}
t.Logf("Got: %s", rec.Body.Bytes())
}