diff options
author | skyblue <ssx205@gmail.com> | 2014-03-31 16:24:58 +0800 |
---|---|---|
committer | skyblue <ssx205@gmail.com> | 2014-03-31 16:24:58 +0800 |
commit | 9acc1c33be76b05231ec3a5a222af02484689974 (patch) | |
tree | 80d3ecab43506e03405c742a84dcc61f474e2212 /tests/default_test.go | |
parent | 587e6d80890f9e679b13a1511dab6635fd520775 (diff) |
add go functest
Diffstat (limited to 'tests/default_test.go')
-rw-r--r-- | tests/default_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
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) + } +} |