summaryrefslogtreecommitdiffstats
path: root/web/web_test.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-14 16:59:24 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-14 16:59:24 -0700
commit3bd350dcaf65a89040f7ea395a19b620819ba03e (patch)
tree72b49e6fadfc1d513489b8938d5f73620ff2a6d8 /web/web_test.go
parente06e292be71ca699d90bafbd635118aa47c2d7a5 (diff)
parentbfebb41bc0c0a1c5f481617f912bdf6dd483c341 (diff)
downloadchat-3bd350dcaf65a89040f7ea395a19b620819ba03e.tar.gz
chat-3bd350dcaf65a89040f7ea395a19b620819ba03e.tar.bz2
chat-3bd350dcaf65a89040f7ea395a19b620819ba03e.zip
Merge branch 'master' into PLT-12-log
Diffstat (limited to 'web/web_test.go')
-rw-r--r--web/web_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/web_test.go b/web/web_test.go
index ff37b74d5..ccd0bba56 100644
--- a/web/web_test.go
+++ b/web/web_test.go
@@ -36,9 +36,14 @@ func TearDown() {
func TestStatic(t *testing.T) {
Setup()
- resp, _ := http.Get(URL + "/static/images/favicon.ico")
+ // add a short delay to make sure the server is ready to receive requests
+ time.Sleep(1 * time.Second)
- if resp.StatusCode != http.StatusOK {
+ resp, err := http.Get(URL + "/static/images/favicon.ico")
+
+ if err != nil {
+ t.Fatalf("got error while trying to get static files %v", err)
+ } else if resp.StatusCode != http.StatusOK {
t.Fatalf("couldn't get static files %v", resp.StatusCode)
}
}