package transfer_test import ( "testing" "github.com/stretchr/testify/assert" "penahub.gitlab.yandexcloud.net/pena-services/customer/internal/models" "penahub.gitlab.yandexcloud.net/pena-services/customer/internal/proto/discount" "penahub.gitlab.yandexcloud.net/pena-services/customer/internal/utils/transfer" ) func TestTariffsToProductInformations(t *testing.T) { t.Run("Успешный перевод массива моделей тарифов в массив информации о продуктах", func(t *testing.T) { assert.Equal(t, []*discount.ProductInformation{ {ID: "1", Price: 20}, {ID: "2", Price: 10}, }, transfer.TariffsToProductInformations([]models.Tariff{ {ID: "1", Price: 20}, {ID: "2", Price: 10}, }), ) }) }