diff --git a/internal/cardsinfo/format_test.go b/internal/cardsinfo/format_test.go new file mode 100644 index 0000000..5c94176 --- /dev/null +++ b/internal/cardsinfo/format_test.go @@ -0,0 +1,17 @@ +package cardsinfo + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestFormatCardPrices(t *testing.T) { + formatted := FormatCardPrices("card", []CardPrice{ + &ScgCardPrice{ + Price: "1.5$", + Edition: "ED", + Link: "scg.com", + }, + }) + assert.Equal(t, "Оригинальное название: card\nРезультатов: 1\n1. ED: 1.5$\nscg.com\n", formatted) +}