2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 14:57:16 +08:00
Files
panel/pkg/api/api_test.go
2024-09-18 19:08:45 +08:00

32 lines
496 B
Go

package api
import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/TheTNB/panel/internal/panel"
)
type APITestSuite struct {
suite.Suite
api *API
}
func TestAPITestSuite(t *testing.T) {
panel.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)
}