2023-05-16 01:12:07 +00:00
|
|
|
package initialize_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
2023-05-19 04:50:40 +00:00
|
|
|
"go.uber.org/zap"
|
2023-05-16 04:01:55 +00:00
|
|
|
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/initialize"
|
2023-05-16 01:12:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewControllers(t *testing.T) {
|
|
|
|
t.Run("Контроллеры должны успешно инициализироваться", func(t *testing.T) {
|
2023-05-19 04:50:40 +00:00
|
|
|
logger := zap.New(zap.L().Core())
|
|
|
|
|
2023-05-16 01:12:07 +00:00
|
|
|
assert.NotPanics(t, func() {
|
|
|
|
controllers := initialize.NewControllers(&initialize.ControllersDeps{
|
2023-05-19 04:50:40 +00:00
|
|
|
Logger: logger,
|
2023-05-16 01:12:07 +00:00
|
|
|
Services: &initialize.Services{},
|
|
|
|
})
|
|
|
|
|
|
|
|
assert.NotNil(t, controllers)
|
2023-05-18 12:26:37 +00:00
|
|
|
assert.NotNil(t, controllers.AccountController)
|
2023-05-19 04:50:40 +00:00
|
|
|
assert.NotNil(t, controllers.CurrencyController)
|
2023-05-16 01:12:07 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|