From 9acc1c33be76b05231ec3a5a222af02484689974 Mon Sep 17 00:00:00 2001 From: skyblue Date: Mon, 31 Mar 2014 16:24:58 +0800 Subject: add go functest --- tests/default_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/default_test.go (limited to 'tests/default_test.go') diff --git a/tests/default_test.go b/tests/default_test.go new file mode 100644 index 00000000..d6f3a03b --- /dev/null +++ b/tests/default_test.go @@ -0,0 +1,17 @@ +package test + +import ( + "net/http" + "testing" +) + +func TestMain(t *testing.T) { + r, err := http.Get("http://localhost:3000/") + if err != nil { + t.Fatal(err) + } + defer r.Body.Close() + if r.StatusCode != http.StatusOK { + t.Error(r.StatusCode) + } +} -- cgit v1.2.3