2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 00:39:32 +08:00
Files
panel/pkg/api/api_test.go
2024-09-18 19:02:49 +08:00

32 lines
492 B
Go

package api
import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/TheTNB/panel/internal/app"
)
type APITestSuite struct {
suite.Suite
api *API
}
func TestAPITestSuite(t *testing.T) {
app.Version = "2.3.0"
suite.Run(t, &APITestSuite{
api: NewAPI(),
})
}
func (s *APITestSuite) TestGetLatestVersion() {
_, err := s.api.GetLatestVersion()
s.NoError(err)
}
func (s *APITestSuite) TestGetVersionsLog() {
_, err := s.api.GetIntermediateVersions()
s.NoError(err)
}