You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
247 B

10 years ago
  1. package test
  2. import (
  3. "net/http"
  4. "testing"
  5. )
  6. func TestMain(t *testing.T) {
  7. r, err := http.Get("http://localhost:3000/")
  8. if err != nil {
  9. t.Fatal(err)
  10. }
  11. defer r.Body.Close()
  12. if r.StatusCode != http.StatusOK {
  13. t.Error(r.StatusCode)
  14. }
  15. }