package initialize_test import ( "testing" "github.com/stretchr/testify/assert" "go.mongodb.org/mongo-driver/mongo/integration/mtest" "penahub.gitlab.yandexcloud.net/pena-services/pena-social-auth/internal/initialize" ) func TestNewRepositories(t *testing.T) { mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock)) mt.Run("Репозитории должны успешно инициализироваться", func(t *mtest.T) { assert.NotPanics(t, func() { repositories := initialize.NewRepositories(&initialize.RepositoriesDeps{ MongoDB: t.Client.Database("test"), }) assert.NotNil(t, repositories) assert.NotNil(t, repositories.AmocrmRepository) assert.NotNil(t, repositories.GoogleRepository) assert.NotNil(t, repositories.HealthRepository) }) }) }