mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-25 06:15:56 +01:00
23 lines
387 B
Go
23 lines
387 B
Go
package api
|
|
|
|
import (
|
|
//_ "github.com/snikch/goodman/hooks"
|
|
//_ "github.com/snikch/goodman/transaction"
|
|
"net/http"
|
|
"net/http/httptest"
|
|
"testing"
|
|
)
|
|
|
|
func TestApiPing(t *testing.T) {
|
|
req, _ := http.NewRequest("GET", "/api/ping", nil)
|
|
rr := httptest.NewRecorder()
|
|
|
|
r := Route()
|
|
|
|
r.ServeHTTP(rr, req)
|
|
|
|
if rr.Code != 200 {
|
|
t.Errorf("Response code should be 200 %d", rr.Code)
|
|
}
|
|
}
|