Added test for card formatting
This commit is contained in:
parent
121bb9fc9c
commit
c8efc24ef5
1 changed files with 17 additions and 0 deletions
17
internal/cardsinfo/format_test.go
Normal file
17
internal/cardsinfo/format_test.go
Normal file
|
|
@ -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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue