mtg-price-bot/internal/cardsinfo/format_test.go
Artyom Belousov 40f1687972 Added Fetcher
2021-02-07 10:33:16 +03:00

18 lines
412 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package cardsinfo
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestFormatCardPrices(t *testing.T) {
f := &Fetcher{}
formatted := f.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)
}