1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-01-22 13:43:04 +02:00
pocketbase/apis/health_test.go

29 lines
477 B
Go
Raw Normal View History

2022-12-11 16:27:46 +01:00
package apis_test
import (
"net/http"
"testing"
2022-12-16 17:06:03 +02:00
"github.com/pocketbase/pocketbase/tests"
2022-12-11 16:27:46 +01:00
)
func TestHealthAPI(t *testing.T) {
scenarios := []tests.ApiScenario{
{
Name: "health status returns 200",
Method: http.MethodGet,
Url: "/api/health",
ExpectedStatus: 200,
ExpectedContent: []string{
`"code":200`,
2023-05-13 22:10:14 +03:00
`"data":{`,
`"canBackup":true`,
2022-12-11 16:27:46 +01:00
},
},
}
for _, scenario := range scenarios {
scenario.Test(t)
}
}