core/tests/publish_test.go

25 lines
590 B
Go
Raw Normal View History

2024-03-13 17:23:27 +00:00
package tests
import (
2025-02-24 17:06:12 +00:00
"gitea.pena/PenaSide/common/privilege"
"gitea.pena/SQuiz/common/model"
2024-03-13 17:23:27 +00:00
"github.com/gofiber/fiber/v2"
"github.com/stretchr/testify/assert"
"testing"
)
func TestPublishPrivileges(t *testing.T) {
clientData := privilege.Client{
URL: "http://localhost:8001",
ServiceName: "squiz",
Privileges: model.Privileges,
}
fiberClient := &fiber.Client{}
privilegeController := privilege.NewPrivilege(clientData, fiberClient)
t.Run("PublishPrivileges", func(t *testing.T) {
err := privilegeController.PublishPrivileges()
assert.NoError(t, err)
})
}