Fixed GET / (topics) test

This commit is contained in:
James Mills 2018-05-14 03:25:00 -07:00
parent f9eaa0f881
commit 5827535f6d
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -77,7 +77,8 @@ func TestServeHTTPGETTopics(t *testing.T) {
mb.ServeHTTP(w, r)
assert.Equal(w.Code, http.StatusOK)
assert.Regexp(`{"foo":{"name":"foo","seq":0,"created":"\d+-\d+-\d+T\d+:\d+:\d+.\d+-\d+:\d+"},"hello":{"name":"hello","seq":0,"created":"\d+-\d+-\d+T\d+:\d+:\d+.\d+-\d+:\d+"}}`, w.Body.String())
assert.Contains(w.Body.String(), "foo")
assert.Contains(w.Body.String(), "hello")
}
func TestServeHTTPGETEmptyQueue(t *testing.T) {